![]() |
#1 |
Junior Member
Join Date: May 2008
Posts: 5
|
How do I get a single NSIS script with parameters?
Hello,
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. thanks |
![]() |
![]() |
![]() |
#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 !else some other code !endif http://nsis.sourceforge.net/Docs/Chapter5.html#5.4.3 |
![]() |
![]() |
![]() |
|
Tags |
command line parameters, parameter |
Thread Tools | Search this Thread |
Display Modes | |
|
|