Old 14th December 2006, 10:15   #1
Nniol
Junior Member
 
Join Date: Oct 2006
Posts: 26
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
Nniol is offline   Reply With Quote
Old 14th December 2006, 11:06   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
NSIS documentation 4.9.7.1 GetErrorLevel

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 14th December 2006, 11:11   #3
Nniol
Junior Member
 
Join Date: Oct 2006
Posts: 26
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
Nniol is offline   Reply With Quote
Old 14th December 2006, 11:15   #4
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
Create .bat file to run your installer and acho %ERRORLEVEL% to get the installers errorlevel.

code:
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.
{_trueparuex^} is offline   Reply With Quote
Old 14th December 2006, 11:29   #5
Nniol
Junior Member
 
Join Date: Oct 2006
Posts: 26
Thanks very much, the test team are highly delighted.

Nniol
Nniol is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump