It looks like you need the "If Errorlevel" command. Assuming your executable returns an exit code other than 0, you do something like:
myProgram.exe if errorlevel 1 goto somethingbad echo Success! exit :somethingbad echo Something Bad Happened.
The error level check is performed as a check of greater or equal, therefore any value other than 0 will cause a jump. Therefore, if you need to check more than one specific output value, you first need to check the highest.
Hellion Aug 10 '10 at 18:20 2010-08-10 18:20
source share