Hi
I'm using the Run command to start a program in a VBScript function - but what do I do to gracefully capture a problem and exit the function in the event the program's not installed on the host machine?
It seems to generate a run-time exception saying the system's been unable to find the file, but the error code and source are (null) and the return value from the Run method doesn't indicate any error state so far as I can see?
My code is:
I'm specifically ensuring CMD points to a nonexistent program so I can try to stop the error occurring and handle it gracefully.
Any suggestions?
Cheers,
Dave
"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me
For all your testing needs: Forum1393
I'm using the Run command to start a program in a VBScript function - but what do I do to gracefully capture a problem and exit the function in the event the program's not installed on the host machine?
It seems to generate a run-time exception saying the system's been unable to find the file, but the error code and source are (null) and the return value from the Run method doesn't indicate any error state so far as I can see?
My code is:
Code:
oWshell.run CMD, DISPLAY_WINDOW, DONT_WAIT_ON_RETURN
WScript.Sleep 3000
Set oWshell = Nothing
I'm specifically ensuring CMD points to a nonexistent program so I can try to stop the error occurring and handle it gracefully.
Any suggestions?
Cheers,
Dave
"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me
For all your testing needs: Forum1393