Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > Programmatically offer remote assistance

Programmatically offer remote assistance

Forum Windows XP : Windows XP General Discussion - Programmatically offer remote assistance

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.work_remotely (More info?)

 

Hey guys, I've revised my original script so that it's more modular...

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"

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windowsxp.work_remotely (More info?)

 

Evidentially it got hosed....please email to
jimDOThubbardATSYMBOLhubbardsoftwareANOTHERDOTnet . Thanks

"EdmSaleBoy" <newsaccountedm@yahoo.com> wrote in message
news:5b77ab07.0406211443.637c253d@posting.google.com...
> Hey guys, I've revised my original script so that it's more modular...
>
> 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%20Assist
ance/Escalation/unsolicited/unsolicitedrcui.htm",
> 0,"true"

Reply to Anonymous
Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > Programmatically offer remote assistance
Go to:

There are 1187 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them