Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing command line arguments in NSIS

Tags:

nsis

I am trying to make my setups scripts modular. I am calling setup exe's from within main setup script based to the requirements. I want to pass command line arguments to the exe being called. Can someone please tell me how to access the command line arguments in the script being called.

Thanks in advance.

like image 567
user774294 Avatar asked May 31 '11 10:05

user774294


People also ask

Where is additional command line arguments?

Open Games tab on the top-left menu, then select a game by clicking on it. Select Options on the menu below the game's title. Select Game Settings on the drop down menu. Tick the Additional command line arguments radio button.

How do you compile NSIS?

nsi file by simply right-clicking on it in Explorer and selecting 'compile'. If you want to use MakeNSIS on the command line, the syntax of makensis is: makensis [ option | script.

Does NSIS work on Linux?

The NSIS installer compiler will work under Linux and MacOSX but you will have to download the source and compile it yourself.


1 Answers

you can use GetOptions function (FileFunc.nsh must be included above). Following example shows p parameter reading; its value is saved into the variable. $CMDLINE is your command line (absolute or relative, as you called) containing also your parameters.

!include FileFunc.nsh

Var variable    
${GetOptions} $CMDLINE "/p" $variable
like image 59
zbynour Avatar answered Oct 12 '22 15:10

zbynour