Skip to content
⌘ NSIS Forum Archive

CMDLINE/GetParameters confusion

2 posts

honold#

CMDLINE/GetParameters confusion

MessageBox MB_OK "$CMDLINE"
Call GetParameters
MessageBox MB_OK "$0 $1 $2"

if i run "setup.exe par1 par2" the first mbox displays "setup.exe par1 par2", and the second mbox is EMPTY. as far as i can tell, the GetParameters function (defined in the functions.htm file at http://www.nullsoft.com/free/nsis/fu...#GetParameters ) pops out the user variables $0 $1 and $2. shouldn't ONE of them be something other than null in this situation?
Guest#
Please read the documentation about the script.
output, top of stack (replaces, with i.e. whatever)
So the script becomes:
Call GetParameters
Pop $0
MessageBox MB_OK $0
BTW, this only extract ALL parameters. If you want to extract a single parameter, use the attached code.

Good luck,
-Hendri.