Page 1 of 1

Reset ErrorLevel to "0" manually?

Posted: 02. Dec 2013, 16:25
by skdb
In the setup.inf, is it possible to reset the ErrorLevel to "0" manually?

For example -
If "%ErrorLevel%" == "12345678" Then "Set:ResetErrorLevel" EndIf

[Set:ResetErrorLevel]
Set ERRORLEVEL = "0"

(I have tried the above and debugger says invalid)

Re: Reset ErrorLevel to "0" manually?

Posted: 02. Dec 2013, 18:07
by Hendrik_Ambrosius
I don´t think so.
Just an idea for another approach: start another executable that always returns errorlevel 0 to reset it.

Re: Reset ErrorLevel to "0" manually?

Posted: 03. Dec 2013, 09:26
by skdb
Thanks Hendrik...the below works fine :-)

Code: Select all

If "%ErrorLevel%" == "12345678" Then "Set:ResetErrorLevel" EndIf

[Set:ResetErrorLevel]
Call CMD /C EXIT 0