Don't pass an ArgumentList unless an ArgumentList exists
This commit is contained in:
@@ -148,6 +148,12 @@ Section Install
|
||||
${EndIf}
|
||||
${GetOptions} $CMDLINE "/p" $PARENTOPTIONS
|
||||
|
||||
# if PARENTOPTIONS is not blank, prepend PARENTOPTIONS string with -ArgumentList
|
||||
${If} "${PARENTOPTIONS}" != ""
|
||||
StrCpy $PARENTOPTIONS "-ArgumentList '${PARENTOPTIONS}'"
|
||||
${EndIf}
|
||||
|
||||
|
||||
# set the installation directory as the destination for the following actions
|
||||
createDirectory $INSTDIR
|
||||
SetOutPath $INSTDIR
|
||||
@@ -155,7 +161,7 @@ Section Install
|
||||
UserInfo::GetAccountType
|
||||
pop $0
|
||||
${If} $I2PINSTEXE != "${I2PINSTEXE_USERMODE}"
|
||||
ExecShell open "powershell -Command Start-Process .\I2P-Profile-Installer-${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}-wrapped.exe -Verb RunAs -Wait -ArgumentList '$PARENTOPTIONS'"
|
||||
ExecShell open "powershell -Command Start-Process .\I2P-Profile-Installer-${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}-wrapped.exe -Verb RunAs -Wait $PARENTOPTIONS"
|
||||
${Else}
|
||||
ExecShell open "I2P-Profile-Installer-${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}-wrapped.exe $PARENTOPTIONS"
|
||||
${EndIf}
|
||||
|
||||
@@ -345,10 +345,13 @@ FunctionEnd
|
||||
# start default section
|
||||
Section Install
|
||||
${GetOptions} $CMDLINE "/p" $PARENTOPTIONS
|
||||
${If} "${PARENTOPTIONS}" != ""
|
||||
StrCpy $PARENTOPTIONS "-ArgumentList '${PARENTOPTIONS}'"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "${I2PINSTEXE64}\i2p.exe"
|
||||
ExecShell open "powershell -Command Start-Process .\$EXEFILE -Wait -Verb RunAs -ArgumentList '$PARENTOPTIONS'"
|
||||
ExecShell open "powershell -Command Start-Process .\$EXEFILE -Wait -Verb RunAs $PARENTOPTIONS"
|
||||
${ElseIf} ${FileExists} "${I2PINSTEXE32}\i2p.exe"
|
||||
ExecShell open "powershell -Command Start-Process .\$EXEFILE -Wait -Verb RunAs -ArgumentList '$PARENTOPTIONS'"
|
||||
ExecShell open "powershell -Command Start-Process .\$EXEFILE -Wait -Verb RunAs $PARENTOPTIONS"
|
||||
${Else}
|
||||
Call installerFunction
|
||||
${EndIf}
|
||||
|
||||
Reference in New Issue
Block a user