Skip to content
⌘ NSIS Forum Archive

Conditionally Set SetDetailsPrint

5 posts

trippy1976#

Conditionally Set SetDetailsPrint

In .onInit I have this:

StrCpy $verbosity "none"
${GetParameters} $R0
${if} $R0 == "verbose"
StrCpy $verbosity "both"
MessageBox MB_ICONINFORMATION $verbosity
${endif}

This grabs the parameters which I only have one which is blank or "verbose"

It sets the $verbosity variable correctly, I confirm this by the message box.

Then throughout my installer I want to SetDetailsPrint to both if verbose was specified on the command line or none if not.

In my section I have this:


${if} $verbosity == "verbose"
SetDetailsPrint both
${else}
SetDetailsPrint none
${endif}


But it does not set it to both. Only to what I explicitly set at the beginning of the section.

Basically I want to be able to see the full details when a problem with the installer happens so I can troubleshoot, but under normal conditions I don't want the full paths and commands I'm executing to show up.

Seems like this should be possible, can someone help?
Afrow UK#
Can't tell you the problem from that. It looks fine. Unless something else is using SetDetailsPrint (i.e. a function or macro).

Stu
Wizou#
Originally Posted by trippy1976 View Post
StrCpy $verbosity "both"
...
${if} $verbosity == "verbose"
shouldn't it be
${if} $verbosity == "both"
?
trippy1976#
I don't know whether to laugh or cry. Thanks Wizou, I just could *not* see that.

Of course... this fixed everything. lol. Thanks.