Terminate with Exit Code
Posted: Thu May 21, 2009 12:58 pm
Just changed my InstallAware setup code to use "Terminate with Exit Code". Now when I run the setup.exe under Vista, depending on where I break from the setup, I get the correct exit code - as displayed by "echo %ERRORLEVEL%" from Vista's DOS command window.
However, when the same setup.exe is run from Windows XPSP2, it does not update the ERRORLEVEL. The ERRORLEVEL value remains the same as before setup.exe was launched. So if the ERRORLEVEL was set to 99, after setup finished (or terminates) the ERRORLEVEL is still set to 99.
I then ran a test C++ exe and after this exe finished, ERRORLEVEL does show the actual error code returned by the test EXE. So ERRORLEVEL logic is working under XPSP2 - just not with SETUP.EXE.
Help ?
However, when the same setup.exe is run from Windows XPSP2, it does not update the ERRORLEVEL. The ERRORLEVEL value remains the same as before setup.exe was launched. So if the ERRORLEVEL was set to 99, after setup finished (or terminates) the ERRORLEVEL is still set to 99.
I then ran a test C++ exe and after this exe finished, ERRORLEVEL does show the actual error code returned by the test EXE. So ERRORLEVEL logic is working under XPSP2 - just not with SETUP.EXE.
Help ?