msmith_1
11 years agoOccasional Contributor
Trouble with wScript.Shell
Hello,
I'm trying to shell out to one of our tested apps with the following script:
Sub StartE2Shop()
dim objShell
Set objShell = Sys.OleObject("WScript.Shell")
objShell.Run("cmd /c cd\LabAutomation\Build & C:\LabAutomation\Build\E2SS_Shop_Gatekeeper.exe |Time_And_Attendance_001 | TC12TA |66")
Set objShell = Nothing
End Sub
The problem stems from the method used to pass parameters to the app. If I leave out the parameters, the app starts as it should, but throws an error that it doesn't have the data it needs to run (as it should). When I include the parameters as written above the line executes without error, but nothing happens. The app does not start.
thanks,
Mike Smith
I'm trying to shell out to one of our tested apps with the following script:
Sub StartE2Shop()
dim objShell
Set objShell = Sys.OleObject("WScript.Shell")
objShell.Run("cmd /c cd\LabAutomation\Build & C:\LabAutomation\Build\E2SS_Shop_Gatekeeper.exe |Time_And_Attendance_001 | TC12TA |66")
Set objShell = Nothing
End Sub
The problem stems from the method used to pass parameters to the app. If I leave out the parameters, the app starts as it should, but throws an error that it doesn't have the data it needs to run (as it should). When I include the parameters as written above the line executes without error, but nothing happens. The app does not start.
thanks,
Mike Smith