Archive: command line arguments outside sections


command line arguments outside sections
I want to have a special /V (verbose) command line switch to my installer where users can optionally get all the detailed log messages for debug purposes.

I have read about $CMDLINE and GetOptions however the NSIS code I want to control is outside sections:

; based on /V turn this on/off
!define MUI_FINISHPAGE_NOAUTOCLOSE

That is when /V is passed to the installer I want the log window to stay open so that users can see all log details

any ideas?

thanks
nikos


Here's what I do instead:

Suppose we got the command line argument into a variable called myvar which is properly defined into global variables table:

!include LogicLib.nsh
...

section
${IfThen} $myvar != V ${|} SetAutoClose true ${|}
.....
sectionend


right, so you're saying instead of me using MUI_FINISHPAGE_NOAUTOCLOSE I use SetAutoClose ... I'll see if that works


Certainly works, however it's just a method, nsis flexibility offers several methods to achieve the same task.
You might want to dig into the forum for a while, surely you'll discover several related threads.