Comperio
16th July 2005 23:27 UTC
NSIS Help - what's the meaning of this?
I was browsing the NSIS help files looking for information about installer (and uninstaller) error levels.
I found this example of how to get the error level of an uninstaller by simulating the TEMP file copy like so:
CopyFiles $INSTDIR\uninstaller.exe $TEMP
ExecWait '"$TEMP\uninstaller.exe" _?=$INSTDIR' $0
DetailPrint "uninstaller set error level $0"
What I don't understand is the purpose for the "_?=$INSTDIR" in the command line (shown in red above). I've searched the manual and the forums but haven't found anything on this. Can someone please elaborate? :confused:
pengyou
17th July 2005 10:01 UTC
See this FAQ entry:
http://nsis.sourceforge.net/index.ph...&tx_faq_faq=14
Comperio
17th July 2005 20:57 UTC
That's exactly what the help files say. I know why the command should be used, but what I'm trying to understand is how it works.
In other words, why add the extra _?=$INSTDIR to the end of the command? What does this do?
Afrow UK
17th July 2005 21:01 UTC
Passes the $INSTDIR to the uninstaller. Without it the uninstaller will set $INSTDIR to $EXEDIR which may be no good if the uninstaller is not in the install folder.
It also allows the uninstaller executer (e.g. a NSIS installer with ExecWait) to wait for the uninstaller to finish.
When using _?=, everything after it will become $INSTDIR therefore it must always be the last parameter used.
-Stu
Comperio
17th July 2005 21:11 UTC
Thanks for the info, Afrow.
Is this command-line parameter listed in help files? (If not, it should be.)