Link to home
Start Free TrialLog in
Avatar of Accidental Hyper-V Administrator
Accidental Hyper-V AdministratorFlag for United States of America

asked on

error level checking in a vbscript

Hello all,

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.
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Accidental Hyper-V Administrator

ASKER

Perfect.

Thanks a million. (Or at least 500)

:)