From af44dd357ad7404124ebb99eb0befa34412df485 Mon Sep 17 00:00:00 2001 From: idk Date: Fri, 25 Mar 2022 15:09:15 -0400 Subject: [PATCH] enable a user-mode install of I2P jpackages --- changelog.txt | 8 ++++++++ src/nsis/i2pbrowser-installer.nsi | 16 +++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/changelog.txt b/changelog.txt index 87229e6..335fbda 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,11 @@ +2022-03-25 idk + * This release adds support for user-mode, non-privileged installation of the + jpackaged router and the browser profile. Admin installation is still supported + and detected automatically, to support existing bundles. + * On restart to update, will detect if a router requires admin rights to install + and will ask the user to authorize the update. In user-mode, no prompt will ever + be seen. + 2022-02-10 idk * This release fixes automatic update using Bittorrent within the I2P network and the custom Update PostProcessor. diff --git a/src/nsis/i2pbrowser-installer.nsi b/src/nsis/i2pbrowser-installer.nsi index 0ed1370..9ad5188 100644 --- a/src/nsis/i2pbrowser-installer.nsi +++ b/src/nsis/i2pbrowser-installer.nsi @@ -181,14 +181,16 @@ Function .onInit StrCpy $FFINSTEXE "$PROFILE\Desktop\Tor Browser\Browser\" ${EndIf} ${EndIf} - ${If} ${FileExists} "${I2PINSTEXE32}\i2p.exe" - StrCpy $I2PINSTEXE "${I2PINSTEXE32}" - ${EndIf} - ${If} ${FileExists} "${I2PINSTEXE64}\i2p.exe" + UserInfo::GetAccountType + pop $0 + ${If} $0 == "admin" StrCpy $I2PINSTEXE "${I2PINSTEXE64}" - ${EndIf} - ${If} ${FileExists} "${I2PINSTEXE_USERMODE}\i2p.exe" - StrCpy $I2PINSTEXE "${I2PINSTEXE_USERMODE}" + ${If} ${FileExists} "${I2PINSTEXE32}\i2p.exe" + StrCpy $I2PINSTEXE "${I2PINSTEXE32}" + ${EndIf} + ${If} ${FileExists} "${I2PINSTEXE64}\i2p.exe" + StrCpy $I2PINSTEXE "${I2PINSTEXE64}" + ${EndIf} ${EndIf} # look for user installs FunctionEnd