In chapter "4.12 Silent Installers/Uninstallers" is
example how to read and parse command line parameters.
It expect that quotes will be in form:
"/USERNAME=guest". I think that correct quotes using is
/USERNAME="guest". Here is my macro for such parsing:
!macro FindParam params paramName
${StrStr} $0 "${params}" "/${paramName}="
StrCmp $0 "" no${paramName}
Push $1
Push $2
StrLen $1 "/${paramName}="
StrCpy $0 $0 "" $1
StrCpy $1 $0 1
StrCpy $2 " "
StrCmp $1 '"' 0 notquo${paramName}
StrCpy $2 '"'
StrCpy $0 $0 "" 1
notquo${paramName}:
${StrStr} $1 $0 $2
StrLen $2 $0
StrLen $1 $1
IntOp $2 $2 - $1
StrCpy $0 $0 $2
Pop $2
Pop $1
no${paramName}:
!macroend
Example of use:
Call GetParameters
Pop $9
!insertmacro FindParam $9 "USERNAME"
IfFileExists "$0" 0 skipUSERNAME
Logged In: YES
user_id=584402
If already updating, why not make it recognize both?
Logged In: YES
user_id=584402
Added a link to GetOptions which operates the standard way.