Old 15th June 2010, 22:02   #1
trippy1976
Junior Member
 
Join Date: Jun 2010
Posts: 6
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?
trippy1976 is offline   Reply With Quote
Old 15th June 2010, 22:43   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Can't tell you the problem from that. It looks fine. Unless something else is using SetDetailsPrint (i.e. a function or macro).

Stu
Afrow UK is offline   Reply With Quote
Old 15th June 2010, 23:45   #3
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
Quote:
Originally Posted by trippy1976 View Post
StrCpy $verbosity "both"
...
${if} $verbosity == "verbose"
shouldn't it be
${if} $verbosity == "both"
?
Wizou is offline   Reply With Quote
Old 16th June 2010, 10:28   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Woops!

Stu
Afrow UK is offline   Reply With Quote
Old 16th June 2010, 19:30   #5
trippy1976
Junior Member
 
Join Date: Jun 2010
Posts: 6
I don't know whether to laugh or cry. Thanks Wizou, I just could *not* see that.

Of course... this fixed everything. lol. Thanks.
trippy1976 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump