Old 23rd March 2012, 08:31   #1
Junior Member
Join Date: May 2008
Posts: 5
How do I get a single NSIS script with parameters?


I have one question. I would like to know how it is possible to have a NSIS script accept command line parameters so that it would do different things depending on whether a command line parameter is supplied or not and based on what the command line parameters are. I've been looking at the wiki and the script reference but I couldn't find that anywhere. I imagine if such a feature exists it would work like
"makensis.exe setup.nsi"
to do one thing and
"makensis.exe setup.nsi standalone"
to do another thing

Any assistance would be appreciated.

launchpadtt is offline   Reply With Quote
Old 23rd March 2012, 10:32   #2
Major Dude
Join Date: Oct 2006
Posts: 1,892
You can use the /D switch to supply a define to makensis: http://nsis.sourceforge.net/Docs/Chapter3.html

In your script, then use
!ifdef yourdefine
some code
some other code

MSG is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

command line parameters, parameter

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