Home > 3rd Party Tools > Web Remote Console v3.21 Windows Version Check for RA

Web Remote Console v3.21 Windows Version Check for RA


In using the Web Remote Console v3.21 created by Ron Crumbaker we ran into an issue with some people doing support with Windows 7/Windows Server 2008 devices and some doing support with Windows XP or via a Citrix session on Windows Server 2003.  To account for the differences with Remote Assistance (msra.exe and helpctr.exe)  I leveraged some code from Sherry Kissinger and added an OS check earlier in the “machrest.asp” file.  It might not be super clean but it gets the job done!  :0)

***Please remember that RA is a feature that needs to be added in Windows Server 2008***

Web Console: http://www.myitforum.com/articles/2/view.asp?id=8662 
Reference: http://myitforum.com/cs2/blogs/skissinger/

Sub CheckOS

dim shell, strOS, strVerKey, strVersion, ObjFSO
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set Shell = CreateObject(“WScript.Shell”)
strOS = shell.ExpandEnvironmentStrings(“%OS%”)
If strOS = “Windows_NT” Then
   strVerKey = “HKLMSOFTWAREMicrosoftWindows NTCurrentVersion”
   strVersion = Shell.regread(strVerKey & “ProductName”) & ” ” & Shell.regread(strVerKey & “CurrentVersion”) & “.” & Shell.regread(strVerkey & “CurrentBuildNumber”)
Else
  strVerKey = “HKLMSOFTWAREMicrosoftWindowsCurrentVersion”
  strVersion = Shell.regread(strVerKey & “ProductName”) & ” ” & Shell.regread(strVerKey & “VersionNumber”)
End if
‘MsgBox strVersion
    ‘msgbox “The current OS is ” & strVersion & “.”
If instr(strVersion, “Windows 7”) > 0 then
    ‘msgbox “Win7”
    strOSType = “Win7”
End If

If instr(strVersion, “2008”) > 0 then
    ‘msgbox “svr2k8”
    strOSType = “svr2k8”
End If

set Shell=nothing

End Sub 

‘———————————————————————————-
‘Opens the Remote Assistant Feature.  Grabs the ComputerName from the Textbox.
‘———————————————————————————-
Sub Btnl10_OnClick
    dim CompName, wshell, fso, strWindir, strSMSUnsolicitedFileSource, StrSMSDir, strSMSFile

    Set WShell = CreateObject(“WScript.Shell”)
    CompName = document.frmMain.txtValue.value
    Set fso = CreateObject(“Scripting.FileSystemObject”)
    strWindir = wshell.expandenvironmentstrings(“%windir%”)
     strSMSUnsolicitedFileSource = “\\SERVERNAME\remote$\smsunsolicitedrcui.htm”
    StrSMSDir = strwindir & “PCHEALTHHELPCTRVendorsCN=Microsoft Corporation,L=Redmond,S=Washington,C=USRemote AssistanceEscalationUnsolicited”
     strSMSFile = strSMSDir & “smsunsolicitedrcui.htm”

    IF strOSType = “svr2k8” THEN
        WShell.Run “%windir%\system32\msra.exe /offerra ” & CompName 
    ELSE
        IF strOSType = “Win7” THEN
            WShell.Run “%windir%\system32\msra.exe /offerra ” & CompName 
        ELSE
            if len(trim(CompName)) = 0 then
                 wshell.run “hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/unsolicitedrcui.htm”
             else
                 if fso.fileExists(strSMSFile) Then 
                       WShell.Run strWindir & “pchealthhelpctrbinarieshelpctr.exe -FromStartHelp ” & _
                        “-url hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/unsolicited/UnsolicitedRCUI.htm ” & _
                       “-ExtraArgument ” & “NOVICECOMPUTER=” & CompName & “”””
                  else
                      fso.copyFile strSMSUnsolicitedFileSource,strSMSFile
                       if fso.fileExists(strSMSFile) Then 
                             WShell.Run strWindir & “pchealthhelpctrbinarieshelpctr.exe -FromStartHelp ” & _
                               “-url hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/unsolicited/SMSUnsolicitedRCUI.htm ” & _
                              “-ExtraArgument ” & “NOVICECOMPUTER=” & CompName & “”””
                       else
                            wshell.run “hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/unsolicitedrcui.htm”
                       end if
                  End if
             end if

        END IF
    END IF
End Sub

Advertisements
Categories: 3rd Party Tools
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: