Archive: SetErrorLevel : getting the values


SetErrorLevel : getting the values
Hi

I use SetErrorLevel to return error codes from my installer

e.g.
!define ERROR_NOT_ALL_PREREQS_INSTALLED 100

Call CheckPrereqs ;
StrCmp $NumPreReqsFound "5" checkDLLExistance MessageBox MB_OK
SetErrorLevel ${ERROR_NOT_ALL_PREREQS_INSTALLED}
; Not all pre reqs installed
Return



How to I get hold of the Error level?


Nniol


NSIS documentation 4.9.7.1 GetErrorLevel


Sorry, I want to see the error level after the installer has finished.

So I do a remote install, which is Silent and I want to know the result of the install, 0 for success or, I assume, the value of any call made to SetErrorLevel to inform me of the failure reason

Nniol


Create .bat file to run your installer and acho %ERRORLEVEL% to get the installers errorlevel.

Example:

@echo off
C:\path\myinstaller.exe
echo ErrorLevel: %ERRORLEVEL%
PAUSE


Edit: I don't know if it will work with remote install, but you can also create a launcher with NSIS for you installer. With ExecWait you can get the errorlevel.

Thanks very much, the test team are highly delighted.

Nniol