change OutPath when launching post-install, never self-select an admin install
This commit is contained in:
@@ -26,8 +26,6 @@ SetOverwrite on
|
|||||||
!define FFINSTEXE64 "$PROGRAMFILES64\Mozilla Firefox\"
|
!define FFINSTEXE64 "$PROGRAMFILES64\Mozilla Firefox\"
|
||||||
|
|
||||||
!define I2PINSTEXE
|
!define I2PINSTEXE
|
||||||
!define I2PINSTEXE32 "$PROGRAMFILES32\i2p"
|
|
||||||
!define I2PINSTEXE64 "$PROGRAMFILES64\i2p"
|
|
||||||
!define I2PINSTEXE_USERMODE "$LOCALAPPDATA\i2p"
|
!define I2PINSTEXE_USERMODE "$LOCALAPPDATA\i2p"
|
||||||
|
|
||||||
|
|
||||||
@@ -147,19 +145,13 @@ Page instfiles
|
|||||||
!include i2pbrowser-mozcompat.nsi
|
!include i2pbrowser-mozcompat.nsi
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
StrCpy $I2PINSTEXE "${I2PINSTEXE64}"
|
StrCpy $I2PINSTEXE "${I2PINSTEXE_USERMODE}"
|
||||||
UserInfo::GetAccountType
|
UserInfo::GetAccountType
|
||||||
pop $0
|
pop $0
|
||||||
${If} $0 != "admin"
|
${If} $0 != "admin"
|
||||||
StrCpy $INSTDIR "$LOCALAPPDATA\${COMPANYNAME}\${APPNAME}"
|
StrCpy $INSTDIR "$LOCALAPPDATA\${COMPANYNAME}\${APPNAME}"
|
||||||
StrCpy $I2PINSTEXE "${I2PINSTEXE_USERMODE}"
|
StrCpy $I2PINSTEXE "${I2PINSTEXE_USERMODE}"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${If} ${FileExists} "${I2PINSTEXE32}\i2p.exe"
|
|
||||||
StrCpy $I2PINSTEXE "${I2PINSTEXE32}"
|
|
||||||
${EndIf}
|
|
||||||
${If} ${FileExists} "${I2PINSTEXE64}\i2p.exe"
|
|
||||||
StrCpy $I2PINSTEXE "${I2PINSTEXE64}"
|
|
||||||
${EndIf}
|
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
Call ShouldInstall64Bit
|
Call ShouldInstall64Bit
|
||||||
${If} $0 == 1
|
${If} $0 == 1
|
||||||
@@ -391,6 +383,7 @@ SectionEnd
|
|||||||
|
|
||||||
Function LaunchLink
|
Function LaunchLink
|
||||||
SetOutPath "$I2PINSTEXE"
|
SetOutPath "$I2PINSTEXE"
|
||||||
|
StrCpy $OUTDIR $I2PINSTEXE
|
||||||
${If} ${Silent}
|
${If} ${Silent}
|
||||||
ReadEnvStr $0 RESTART_I2P
|
ReadEnvStr $0 RESTART_I2P
|
||||||
${If} $0 != ""
|
${If} $0 != ""
|
||||||
|
|||||||
Reference in New Issue
Block a user