diff --git a/browser/installer/windows/nsis/installer.nsi b/browser/installer/windows/nsis/installer.nsi index 63e2fd7dea27..435c9c7acf09 100755 --- a/browser/installer/windows/nsis/installer.nsi +++ b/browser/installer/windows/nsis/installer.nsi @@ -838,16 +838,10 @@ Function LaunchApp FunctionEnd Function LaunchAppFromElevatedProcess - ; Find the installation directory when launching using GetFunctionAddress - ; from an elevated installer since $INSTDIR will not be set in this installer - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - ReadRegStr $0 HKLM "Software\Clients\StartMenuInternet\$R9\DefaultIcon" "" - ${GetPathFromString} "$0" $0 - ${GetParent} "$0" $1 ; Set our current working directory to the application's install directory ; otherwise the 7-Zip temp directory will be in use and won't be deleted. - SetOutPath "$1" - Exec "$\"$0$\"" + SetOutPath "$INSTDIR" + Exec "$\"$INSTDIR\${FileMainEXE}$\"" FunctionEnd ################################################################################ diff --git a/browser/installer/windows/nsis/stub.nsi b/browser/installer/windows/nsis/stub.nsi index 9e1f2912f1b9..744e5c37fa55 100644 --- a/browser/installer/windows/nsis/stub.nsi +++ b/browser/installer/windows/nsis/stub.nsi @@ -2065,15 +2065,9 @@ Function LaunchApp FunctionEnd Function LaunchAppFromElevatedProcess - ; Find the installation directory when launching using GetFunctionAddress - ; from an elevated installer since $INSTDIR will not be set in this installer - ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 - ReadRegStr $0 HKLM "Software\Clients\StartMenuInternet\$R9\DefaultIcon" "" - ${GetPathFromString} "$0" $0 ; Set the current working directory to the installation directory - ${GetParent} "$0" $1 - SetOutPath "$1" - Exec "$\"$0$\"" + SetOutPath "$INSTDIR" + Exec "$\"$INSTDIR\${FileMainEXE}$\"" FunctionEnd Function CopyPostSigningData