Bug 1336243 - Fix a regression from bug 1324617 in launching the browser post-install. r?rstrong draft
authorMatt Howell <mhowell@mozilla.com>
Thu, 02 Feb 2017 16:24:55 -0800
changeset 470407 8c6445d4e79a34bd222ce564e755744f08c3dfc3
parent 469700 fc352d66e7bce2a4d8635c1b8a815b62616420b5
child 544462 4b7a3b69ca12972395bfba98653e5ab5fafc8068
push id44011
push usermhowell@mozilla.com
push dateFri, 03 Feb 2017 17:37:06 +0000
reviewersrstrong
bugs1336243, 1324617
milestone54.0a1
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
browser/installer/windows/nsis/installer.nsi
browser/installer/windows/nsis/stub.nsi
--- 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}