SET ERROR.EXE
Utility the SetError.exe can be used for setting any error level.
Example:
@echo off
setup.exe/s
set OLD_ERRORLEVEL=%ERRORLEVEL%
SomeProgram.exe
Set error %OLD_ERRORLEVEL%
It occurs frequently that before or after the start of the actual Setups still some
Work to be carried out must. Typically ranks among it a copying or deletion of
unite auxiliary files such as linkages, changes of file authorizations or
other "small stuff". If one however instead of the start of the original Setups a batch file
, is very important it uses that this batch file returns the delivery the same ERROR LEVEL
like the original Setup.
The solution is appropriate in it, immediately after the start original of the Setups the ERROR LEVEL in
to store another environment variable. At the end of the batch files one can do that
stored ERROR LEVEL with the help of the SetError.exe. repair.
Often it is necessary to introduce an auxiliary examination to the batch files. If that
Original Setup failed, is to be accomplished no further step. Under
other one is not to be started the program SomeProgram.exe in the event of an error. If
the original Setup in the event of an error e.g. ERROR LEVEL not equal 0 produced, the batch knows
Files to be changed in such a way:
@echo off
setup.exe/s
if ERROR LEVEL 1 exit
set OLD_ERRORLEVEL=%ERRORLEVEL%
SomeProgram.exe
Set error %OLD_ERRORLEVEL%
Note:
If one writes a batch file, those never with Windows NT 4.0
, can one is used instead of the SetError.exe utility that
Instruction EXIT with parameter use.
Go to Help Contents
|