Log in

View Full Version : Does mame.exe set errorlevel if it crashes?



darryldale
April 1st, 2015, 01:11
Running mame in a batch file.

Just wondering if it sets errorlevel at all when it is either run successfully or crashes?

looking to do something like:

mame %1
if errorlevel = 0 goto allow
if errorlevel = 1 goto crashed

darryldale
April 1st, 2015, 01:39
Got it figured out (answer is it does).

Batch file is essentially as follows:

rem launch special version
mame %1

rem if it errors out try alternate version
if %errorlevel% neq 0 goto altversion

goto done

:altversion
mame_alt %1

:done

darryldale
April 1st, 2015, 01:43
Even better, just throw the alternate launch on the if line:

mame %1

if %errorlevel% neq 0 mamealt %1