Nniol
14th December 2006 11:15 UTC
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
Red Wine
14th December 2006 12:06 UTC
NSIS documentation 4.9.7.1 GetErrorLevel
Nniol
14th December 2006 12:11 UTC
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
{_trueparuex^}
14th December 2006 12:15 UTC
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.
Nniol
14th December 2006 12:29 UTC
Thanks very much, the test team are highly delighted.
Nniol