Bug 1336243 - Fix a regression from
bug 1324617 in launching the browser post-install. r?rstrong
Bug 1324617 changed the name of the registry path that was being used to find
the new installation to launch, but forgot to update that function. This patch
switches to a more direct method of getting the right path to launch.
MozReview-Commit-ID: Hexhj9y4ixc
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -833,26 +833,20 @@ Function LaunchApp
Exec "$\"$INSTDIR\${FileMainEXE}$\""
${Else}
GetFunctionAddress $0 LaunchAppFromElevatedProcess
UAC::ExecCodeSegment $0
${EndIf}
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
################################################################################
# Language
!insertmacro MOZ_MUI_LANGUAGE 'baseLocale'
!verbose push
!verbose 3
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -2060,25 +2060,19 @@ Function LaunchApp
Exec "$\"$INSTDIR\${FileMainEXE}$\""
${Else}
GetFunctionAddress $0 LaunchAppFromElevatedProcess
UAC::ExecCodeSegment $0
${EndIf}
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
${LineRead} "$EXEDIR\postSigningData" "1" $PostSigningData
${If} ${Errors}
ClearErrors
StrCpy $PostSigningData "0"
${Else}