Archive: Help needed: Return Error Code to batch from NSIS Installer


Help needed: Return Error Code to batch from NSIS Installer
Hi, I am new to NSIS. I've been trying (with no success) to have a batch (.bat) file call the NSIS setup and have it return an error code. Really all i need is 0 (success) 1 (failed).

Am I trying to do something that cannot be done?

If not, any suggestions as to how?

Thanks in advance to anyone who could help.


How is this NSIS related?

When you say .bat, do you mean DOS/Win9x compatibility or just WinNT?

Anyway, for 2000+ (and maybe NT4):

@echo off
call setup.exe&&(
echo ==0
) || (
echo !=0
)
Or the old school way: (Did not actually test on old systems)
@echo off
call setup.exe
if ERRORLEVEL 1 goto failed
echo ==0
goto end
:failed
echo !=0
:end

I am using NSIS you make a silent install that will be called by a .bat

the .bat is only for NT.

i understand the logic in the second example, however could you clearify the first one for me please?

and once again, thank you sir!