It makes the assumption that the user name of the remote computer and
the remote computer name are the same. If not, hack the code!
This script allows you to automagically solicit remote assistance
requests. The best way to use it is to plug it into your custom
support system, whatever it is. It will work on a "Local intranet"
page as well.
If your newsreader butchers the code, just email me and I'll send you
a text file of it.
on error resume next
strName="COMPUTERNAME"
domainName="DOMAIN"
dnsName="domain.com"
set fsoObject = CreateObject("Scripting.FileSystemObject")
Set textStreamObject =
fsoObject.CreateTextFile("C:\WINDOWS\PCHealth\HelpCtr\Vendors\CN=Microsoft
Corporation,L=Redmond,S=Washington,C=US\Remote
Assistance\Escalation\Unsolicited\UnSolicitedRCUI.htm")
'C:\WINDOWS\PCHealth\HelpCtr\Vendors\CN=Microsoft
Corporation,L=Redmond,S=Washington,C=US\Remote
Assistance\Escalation\Unsolicited\UnSolicitedRCUI.htm
textStreamObject.WriteLine "<HTML XMLNS:helpcenter>"
textStreamObject.WriteLine "<HEAD>"
textStreamObject.WriteLine "<!--"
textStreamObject.WriteLine "Copyright (c) 2000 Microsoft Corporation"
textStreamObject.WriteLine "-->"
textStreamObject.WriteLine "<helpcenter:context id=idCtx />"
textStreamObject.WriteLine "<TITLE>Remote Assistance</TITLE>"
textStreamObject.WriteLine "<!-- The SAF class factory object -->"
textStreamObject.WriteLine "<OBJECT
classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7 height=0
id=oSAFClassFactory"
textStreamObject.WriteLine "width=0></OBJECT>"
textStreamObject.WriteLine "<script LANGUAGE=" & Chr(34) &
"Javascript" & Chr(34) & ">"
textStreamObject.WriteLine "var g_szRCTicket = null;"
textStreamObject.WriteLine "var g_szUserName = null;"
textStreamObject.WriteLine "var g_szDomainName = null;"
textStreamObject.WriteLine "var g_szSessionId = null;"
textStreamObject.WriteLine "var g_iExpiry = 5;"
textStreamObject.WriteLine "var g_oSAFRemoteDesktopConnection = null;"
textStreamObject.WriteLine "var g_oSAFRemoteConnectionData = null;"
textStreamObject.WriteLine "var g_oUsersCollection = null;"
textStreamObject.WriteLine "var g_nUsersLen = null;"
textStreamObject.WriteLine "var g_oSessionsCollection = null;"
textStreamObject.WriteLine "var g_nSessionsLen = null;"
textStreamObject.WriteLine "g_bDebug = false;"
textStreamObject.WriteLine "function onContinue()"
textStreamObject.WriteLine "{"
textStreamObject.WriteLine "var szIncidentFile = null;"
textStreamObject.WriteLine "var fso = null;"
textStreamObject.WriteLine "var tempDir = null;"
textStreamObject.WriteLine "var oInc = null;"
textStreamObject.WriteLine "g_szDomainName = " & Chr(34) & domainName
& Chr(34) & ";"
textStreamObject.WriteLine "g_szUserName = " & Chr(34) & "" & strNAme
& "" & Chr(34) & ";"
textStreamObject.WriteLine "g_szSessionId = -1;"
textStreamObject.WriteLine "g_oSAFRemoteDesktopConnection =
oSAFClassFactory.CreateObject_RemoteDesktopConnection();"
textStreamObject.WriteLine "g_oSAFRemoteConnectionData =
g_oSAFRemoteDesktopConnection.ConnectRemoteDesktop(" & Chr(34) & "" &
strName & "" & Chr(34) & ");"
textStreamObject.WriteLine "oInc =
oSAFClassFactory.CreateObject_Incident();"
textStreamObject.WriteLine "oInc.UserName = g_szUserName;"
textStreamObject.WriteLine "oInc.RCTicketEncrypted = false;"
textStreamObject.WriteLine "oInc.RcTicket =
g_oSAFRemoteConnectionData.ConnectionParms( " & Chr(34) & "" & strName
& "" & Chr(34) & ", g_szUserName, g_szDomainName, g_szSessionId, " &
Chr(34) & "" & Chr(34) & ");"
textStreamObject.WriteLine "var oDict = oInc.Misc;"
textStreamObject.WriteLine "var d = new Date();"
textStreamObject.WriteLine "var iNow =
Math.round(Date.parse(d)/1000);"
textStreamObject.WriteLine "oDict.add(" & Chr(34) & "DtStart" &
Chr(34) & ", iNow);"
textStreamObject.WriteLine "oDict.add(" & Chr(34) & "DtLength" &
Chr(34) & ", g_iExpiry);"
textStreamObject.WriteLine "oDict.add(" & Chr(34) & "IP" & Chr(34) &
", " & Chr(34) & "" & cboMachine & "." & dnsName & Chr(34) & ");"
textStreamObject.WriteLine "oDict.add(" & Chr(34) & "Status" & Chr(34)
& ", " & Chr(34) & "Active" & Chr(34) & ");"
textStreamObject.WriteLine "oDict.add(" & Chr(34) & "URA" & Chr(34) &
", 1);"
textStreamObject.WriteLine "fso = new ActiveXObject(" & Chr(34) &
"Scripting.FileSystemObject" & Chr(34) & ");"
textStreamObject.WriteLine "tempDir = fso.GetSpecialFolder( 2 );"
textStreamObject.WriteLine "szIncidentFile = tempDir + " & Chr(34) &
"\\UnsolicitedRA" & Chr(34) & " + fso.GetTempName();"
textStreamObject.WriteLine "oInc.GetXML(szIncidentFile);"
textStreamObject.WriteLine "var oShell = new ActiveXObject(" & Chr(34)
& "WScript.Shell" & Chr(34) & ");"
textStreamObject.WriteLine "var szRAURL =
'C:\\WINDOWS\\pchealth\\helpctr\\binaries\\helpctr.exe -Mode " &
Chr(34) & "hcp://system/Remote Assistance/raura.xml" & Chr(34) & "
-url " & Chr(34) & "hcp://system/Remote
Assistance/Interaction/Client/RcToolscreen1.htm" & Chr(34) & "' + '
-ExtraArgument " & Chr(34) & "IncidentFile=' + szIncidentFile + '" &
Chr(34) & "';"
textStreamObject.WriteLine "oShell.Run( szRAURL, 1, true );"
textStreamObject.WriteLine "fso.DeleteFile( szIncidentFile );"
textStreamObject.WriteLine ("return;")
textStreamObject.WriteLine ("}")
textStreamObject.Write "</"
textStreamObject.Write "SCRIPT"
textStreamObject.WriteLine ">"
textStreamObject.WriteLine ("</HEAD>")
textStreamObject.WriteLine ("<BODY onload=" & Chr(34) &
"onContinue();" & Chr(34) & ">")
textStreamObject.WriteLine ("</BODY>")
textStreamObject.WriteLine ("</HTML>")
set fsoObject = Nothing
textStreamObject.Close
set textStreamObject = Nothing
Set ObjWS = CreateObject("WScript.Shell")
objWS.run "cmd /c start
hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/unsolicited/unsolicitedrcui.htm",
0,"true"
"EdmSaleBoy" <newsacc...@yahoo.com> wrote in message
news:5b77ab07.04062...@posting.google.com...
Also, it didn't occur to me that this isn't a scripting newsgroup, and
so it was a little irresponsible for me to assume that people would
check the script before they ran it. Before you run ANY script off
Google (or the Internet, for that matter), make sure that you either
understand what it does, OR GET SOMEONE KNOWS SCRIPTING LANGUAGES
CHECKS IT OUT FIRST! In this case, it'll save you the hassle of
restoring the file.
newsacc...@yahoo.com (EdmSaleBoy) wrote in message news:<5b77ab07.04062...@posting.google.com>...