mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 968916 - Launch the last used browser frontend after pave over installs. r=rstrong
This commit is contained in:
parent
bdfb63926f
commit
c87359e035
@ -309,9 +309,6 @@ Section "-Application" APP_IDX
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
!ifdef MOZ_METRO
|
||||
${ResetWin8MetroSplash}
|
||||
!endif
|
||||
${RemoveDeprecatedKeys}
|
||||
|
||||
; The previous installer adds several regsitry values to both HKLM and HKCU.
|
||||
@ -739,7 +736,25 @@ Function LaunchApp
|
||||
${GetParameters} $0
|
||||
${GetOptions} "$0" "/UAC:" $1
|
||||
${If} ${Errors}
|
||||
Exec "$\"$INSTDIR\${FileMainEXE}$\""
|
||||
StrCpy $1 "0"
|
||||
StrCpy $2 "0"
|
||||
!ifdef MOZ_METRO
|
||||
; Check to see if this install location is currently set as the
|
||||
; default browser.
|
||||
AppAssocReg::QueryAppIsDefaultAll "${AppRegName}" "effective"
|
||||
Pop $1
|
||||
; Check for a last run type to see if metro was the last browser
|
||||
; front end in use.
|
||||
ReadRegDWORD $2 HKCU "Software\Mozilla\Firefox" "MetroLastAHE"
|
||||
!endif
|
||||
${If} $1 == "1"
|
||||
${AndIf} $2 == "1" ; 1 equals AHE_IMMERSIVE
|
||||
; Launch into metro
|
||||
Exec "$\"$INSTDIR\CommandExecuteHandler.exe$\" --launchmetro"
|
||||
${Else}
|
||||
; Launch into desktop
|
||||
Exec "$\"$INSTDIR\${FileMainEXE}$\""
|
||||
${EndIf}
|
||||
${Else}
|
||||
GetFunctionAddress $0 LaunchAppFromElevatedProcess
|
||||
UAC::ExecCodeSegment $0
|
||||
@ -756,7 +771,25 @@ Function LaunchAppFromElevatedProcess
|
||||
; 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$\""
|
||||
StrCpy $2 "0"
|
||||
StrCpy $3 "0"
|
||||
!ifdef MOZ_METRO
|
||||
; Check to see if this install location is currently set as the
|
||||
; default browser.
|
||||
AppAssocReg::QueryAppIsDefaultAll "${AppRegName}" "effective"
|
||||
Pop $2
|
||||
; Check for a last run type to see if metro was the last browser
|
||||
; front end in use.
|
||||
ReadRegDWORD $3 HKCU "Software\Mozilla\Firefox" "MetroLastAHE"
|
||||
!endif
|
||||
${If} $2 == "1"
|
||||
${AndIf} $3 == "1" ; 1 equals AHE_IMMERSIVE
|
||||
; Launch into metro
|
||||
Exec "$\"$1\CommandExecuteHandler.exe$\" --launchmetro"
|
||||
${Else}
|
||||
; Launch into desktop
|
||||
Exec "$\"$0$\""
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
################################################################################
|
||||
|
@ -1429,4 +1429,4 @@ Function SetAsDefaultAppUser
|
||||
FunctionEnd
|
||||
!define SetAsDefaultAppUser "Call SetAsDefaultAppUser"
|
||||
|
||||
!endif
|
||||
!endif ; NO_LOG
|
||||
|
Loading…
Reference in New Issue
Block a user