error level checking in a vbscript
Posted on 2006-04-21
I have a .vbs script that launches a DOS application which, the writer of the application tells me, sets errorlevel to 0 if it runs sucessfully and a 1 in not run sucessfully.
My goal is to find a snippet of vbscript which checks for the value of errorlevel and then does something based on the value.
I am launching the dos based applicaion from my .vbs script using the following lines .....
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run <the location and name of the dos executable goes here>, 1, True
I'm pretty new to vbscript so, "simple is greatly appreciated".
Thanks in advance.