Old 13th July 2016, 12:38   #1
Junior Member
Join Date: Jul 2016
Posts: 1
Check for command line parameter


If I install my application by command line, the user can set a parameter called Matto in this way:

COMMANDLINE: myapp.exe /S -Matto=true

${GetParameters} $R0
${GetOptions} $R0 "-Matto=" $MattoIsSet
pop $MattoIsSet


Is it possible to check only if the parameter is set without a value? For example:

COMMANDLINE: myapp.exe /S -Matto

And in my script I can now check if the user have typed -Matto or not
Struct is offline   Reply With Quote
Old 13th July 2016, 14:42   #2
Afrow UK
Afrow UK's Avatar
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434

${GetParameters} $R0
${GetOptions} $R0 "-Matto" $MattoIsSet
${If} ${NotErrors}
${AndIf} $MattoIsSet == ""

Afrow UK is offline   Reply With Quote
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