I have a vbscript I run now that I can pass in the IP as an argument and it will connect to any user on the fly. It works great.
The first line is testing with ASPExec to see if I can even get the vbs to execute, so far it does not work. Here is the code on my asp page
The response I get is "OK" which tells me the script executed but I didn't get the echo and pcAnywhere doesn't start. I went through and made sure the dll was registered and that "Allow this service to interact with the desktop" was on in the I also created the new COM+ object on my Win 2k server. I have tried executing another app like notepad.exe and it shows up in the processes on my IIS server but never displays on the client side. What could I be missing or doing incorrectly? Thanks in advance.
Code:
WScript.Echo "Made it to the pca.vbs"
Dim wShell, oArgs
Set oArgs = WScript.Arguments
Set wShell = CreateObject("WScript.Shell")
sIP = oArgs.Item(0)
sCMD = """C:\Program Files\Symantec\pcAnywhere\AWREM32.EXE"""
sCMD = sCMD & """\\XXXXXX\[URL unfurl="true"]wwwroot\testsite\Information_Technology\template.CHF"""[/URL]
sCMD = sCMD & """/C"
sCMD = sCMD & sIP
wShell.Run sCMD,9,False
Set wShell = Nothing
The first line is testing with ASPExec to see if I can even get the vbs to execute, so far it does not work. Here is the code on my asp page
Code:
<%'This below is still not working right, the call comes back ok but never launches the app.
If Request.querystring("IP") <> "" Then
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cscript c:\batch\pca.vbs" 'this file is located on the users local drive
Executor.Parameters = Request.QueryString("IP")
Executor.ShowWindow = True
Response.Write "Attempting to Execute " & Executor.Application & "<br>"
strResult = Executor.ExecuteWinApp
Response.Write "The result of this call was: " & strResult
Response.Write "<br>Arguments: " & executor.parameters
End If
%>
The response I get is "OK" which tells me the script executed but I didn't get the echo and pcAnywhere doesn't start. I went through and made sure the dll was registered and that "Allow this service to interact with the desktop" was on in the I also created the new COM+ object on my Win 2k server. I have tried executing another app like notepad.exe and it shows up in the processes on my IIS server but never displays on the client side. What could I be missing or doing incorrectly? Thanks in advance.