Skip to content
⌘ NSIS Forum Archive

if ($0 == 1) { do something }

6 posts

Guest#

if ($0 == 1) { do something }

Hi again. One more question... I use ExecWait to execute a file once installed. Like this:

ExecWait '"$INSTDIR\zLoadIcon2.exe"' $0

So then the exit code of that Application will go in $0. But then if $0 is 1 I want to Abort the install and if it's 0 to continue... something like this...

if ($0 == 1) { do something }

I don't know if NSIS has support for such conditional checking and I checked the documentation and this forum but didn't find anything of use so far. So can it be done?
glory_man#edited
Use strcmp instruction. Or LogicLib.nsh and If statement.

EDIT. Or InCmp instruction instead strcmp.
Guest#
Nope

I can see no such instruction "lncmp" in my NSIS (2.11) documentation. However, the other solutions seem to be ok so thanks a lot ::- D.
Joel#
Re: Nope

Originally posted by Axonn
I can see no such instruction "lncmp" in my NSIS (2.11) documentation. However, the other solutions seem to be ok so thanks a lot ::- D.
IntCmp 🙄