ChrisQuick
Programmer
I have an asp page that uses WSH to run a vbs file named "main.vbs".
This in turn runs additional vbs files including one named "groups.vbs".
I am trying to get the "groups.vbs" to return an error code on exit back to the main and display it, but the response always comes back as a zero.
Any thoughts about what might be wrong??
Here is the relevant code from main:
Set objWshShell = WScript.CreateObject("WScript.Shell"
strWshCommand = "d:\vbs\getgroups.vbs " & intUserID & " " & intMessageID
strWshResponse = objWshShell.Run(strWshCommand, True)
objWshShell.LogEvent 1, "The response was: " & strWshResponse
Here is the code from groups:
' I am passing the wrong number of args on purpose..
If WScript.Arguments.Count <> 3 Then
objWshShell.LogEvent 1, "An invalid number of parameters was passed to the groups vbs file."
Wscript.Quit 1
Else
'tons and tons of code
End If cquick@callingpost.com
Geographic Information System (GIS), ASP, some Oracle
This in turn runs additional vbs files including one named "groups.vbs".
I am trying to get the "groups.vbs" to return an error code on exit back to the main and display it, but the response always comes back as a zero.
Any thoughts about what might be wrong??
Here is the relevant code from main:
Set objWshShell = WScript.CreateObject("WScript.Shell"
strWshCommand = "d:\vbs\getgroups.vbs " & intUserID & " " & intMessageID
strWshResponse = objWshShell.Run(strWshCommand, True)
objWshShell.LogEvent 1, "The response was: " & strWshResponse
Here is the code from groups:
' I am passing the wrong number of args on purpose..
If WScript.Arguments.Count <> 3 Then
objWshShell.LogEvent 1, "An invalid number of parameters was passed to the groups vbs file."
Wscript.Quit 1
Else
'tons and tons of code
End If cquick@callingpost.com
Geographic Information System (GIS), ASP, some Oracle