Skip to content
⌘ NSIS Forum Archive

use custom parameters

4 posts

Ema#

use custom parameters

HI all,
is it possible to launche the ngenerate installer with some parameters. Let's say I want to launch an executable at the end of the install but with some custo parameter.
Something like

but it will have to change the
!define MUI_FINISHPAGE_RUN "$INSTDIR\${MYAPP_EXE}"

Is it possible?

Thanks in advance

ex:
setup.exe -port 10
at the end of the install will launch

MYAPP_EXE -port 10
kichik#
Define MUI_FINISHPAGE_RUN_PARAMETERS as a variable and modify that variable according to the command line.
Ema#edited
Thanks, what I don't know is how to read a parameter in the NSIS script, I know how to pass a parameter when generating the installer but not when the installer generated is launched.
kichik#
The command line is saved in $COMMANDLINE. You can use GetParameters and GetOptions from the useful headers to parse it easily.