зеркало из https://github.com/mozilla/pjs.git
Bug 447928 - HKCU protocol / file handlers won't be updated after update or during an in place upgrade. r=jmathies, approval1.9.0.2=samuel.sidler
This commit is contained in:
Родитель
6dc3c65674
Коммит
cd347a1c93
|
@ -356,6 +356,7 @@ Section "-Application" APP_IDX
|
|||
SetShellVarContext current ; Set SHCTX to HKCU
|
||||
${RegCleanMain} "Software\Mozilla"
|
||||
${RegCleanUninstall}
|
||||
${UpdateProtocolHandlers}
|
||||
|
||||
ClearErrors
|
||||
WriteRegStr HKLM "Software\Mozilla\InstallerTest" "InstallerTest" "Test"
|
||||
|
@ -367,6 +368,7 @@ Section "-Application" APP_IDX
|
|||
StrCpy $TmpVal "HKLM" ; used primarily for logging
|
||||
${RegCleanMain} "Software\Mozilla"
|
||||
${RegCleanUninstall}
|
||||
${UpdateProtocolHandlers}
|
||||
|
||||
ReadRegStr $0 HKLM "Software\mozilla.org\Mozilla" "CurrentVersion"
|
||||
${If} "$0" != "${GREVersion}"
|
||||
|
@ -392,7 +394,6 @@ Section "-Application" APP_IDX
|
|||
${WriteRegDWORD2} $TmpVal "$0" "Create Start Menu Shortcut" $AddStartMenuSC 0
|
||||
|
||||
${FixClassKeys}
|
||||
${UpdateProtocolHandlers}
|
||||
|
||||
; On install always add the FirefoxHTML and FirefoxURL keys.
|
||||
; An empty string is used for the 5th param because FirefoxHTML is not a
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
SetShellVarContext current ; Set SHCTX to the current user (e.g. HKCU)
|
||||
${RegCleanMain} "Software\Mozilla"
|
||||
${RegCleanUninstall}
|
||||
${UpdateProtocolHandlers}
|
||||
|
||||
ClearErrors
|
||||
WriteRegStr HKLM "Software\Mozilla\InstallerTest" "InstallerTest" "Test"
|
||||
|
@ -55,6 +56,7 @@
|
|||
${SetStartMenuInternet}
|
||||
${FixShellIconHandler}
|
||||
${SetUninstallKeys}
|
||||
${UpdateProtocolHandlers}
|
||||
|
||||
ReadRegStr $0 HKLM "Software\mozilla.org\Mozilla" "CurrentVersion"
|
||||
${If} "$0" != "${GREVersion}"
|
||||
|
@ -67,7 +69,6 @@
|
|||
; Add Software\Mozilla\ registry entries
|
||||
${SetAppKeys}
|
||||
${FixClassKeys}
|
||||
${UpdateProtocolHandlers}
|
||||
|
||||
; Remove files that may be left behind by the application in the
|
||||
; VirtualStore directory.
|
||||
|
@ -108,7 +109,6 @@
|
|||
${FixShellIconHandler}
|
||||
WriteRegStr HKCU "Software\Clients\StartMenuInternet" "" "$R9"
|
||||
|
||||
!ifdef ___WINVER__NSH___
|
||||
${If} ${AtLeastWinVista}
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKLM "Software\RegisteredApplications" "${AppRegName}"
|
||||
|
@ -118,7 +118,6 @@
|
|||
AppAssocReg::SetAppAsDefaultAll "${AppRegName}"
|
||||
${EndUnless}
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
${RemoveDeprecatedKeys}
|
||||
|
||||
|
@ -157,11 +156,11 @@
|
|||
${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
|
||||
ShellLink::GetShortCutArgs "$DESKTOP\${BrandFullName}.lnk"
|
||||
Pop $0
|
||||
${If} $0 == ""
|
||||
${If} "$0" == ""
|
||||
ShellLink::GetShortCutTarget "$DESKTOP\${BrandFullName}.lnk"
|
||||
Pop $0
|
||||
; Needs to handle short paths
|
||||
${If} $0 == "$INSTDIR\${FileMainEXE}"
|
||||
${If} "$0" == "$INSTDIR\${FileMainEXE}"
|
||||
Delete "$DESKTOP\${BrandFullName}.lnk"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
@ -170,11 +169,11 @@
|
|||
${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
ShellLink::GetShortCutArgs "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
Pop $0
|
||||
${If} $0 == ""
|
||||
${If} "$0" == ""
|
||||
ShellLink::GetShortCutTarget "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
Pop $0
|
||||
; Needs to handle short paths
|
||||
${If} $0 == "$INSTDIR\${FileMainEXE}"
|
||||
${If} "$0" == "$INSTDIR\${FileMainEXE}"
|
||||
Delete "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
@ -227,7 +226,7 @@
|
|||
WriteRegStr SHCTX "$0\.shtml" "" "FirefoxHTML"
|
||||
${EndIf}
|
||||
|
||||
ReadRegStr $6 HKCR ".hht" ""
|
||||
ReadRegStr $6 HKCR ".xht" ""
|
||||
${If} "$6" != "FirefoxHTML"
|
||||
WriteRegStr SHCTX "$0\.xht" "" "FirefoxHTML"
|
||||
${EndIf}
|
||||
|
@ -362,7 +361,7 @@
|
|||
${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
|
||||
ShellLink::GetShortCutArgs "$DESKTOP\${BrandFullName}.lnk"
|
||||
Pop $1
|
||||
${If} $1 == ""
|
||||
${If} "$1" == ""
|
||||
ShellLink::GetShortCutTarget "$DESKTOP\${BrandFullName}.lnk"
|
||||
Pop $1
|
||||
${GetLongPath} "$1" $1
|
||||
|
@ -376,7 +375,7 @@
|
|||
|
||||
; XXXrstrong - need a cleaner way to prevent unsetting SHCTX from HKLM when
|
||||
; trying to find the desktop shortcut.
|
||||
${If} $TmpVal == "HKCU"
|
||||
${If} "$TmpVal" == "HKCU"
|
||||
SetShellVarContext current ; Set SHCTX to the current user (e.g. HKCU)
|
||||
${Else}
|
||||
SetShellVarContext all ; Set SHCTX to all users (e.g. HKLM)
|
||||
|
@ -385,11 +384,11 @@
|
|||
${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
ShellLink::GetShortCutArgs "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
Pop $1
|
||||
${If} $1 == ""
|
||||
${If} "$1" == ""
|
||||
ShellLink::GetShortCutTarget "$QUICKLAUNCH\${BrandFullName}.lnk"
|
||||
Pop $1
|
||||
${GetLongPath} "$1" $1
|
||||
${If} $1 == "$8\${FileMainEXE}"
|
||||
${If} "$1" == "$8\${FileMainEXE}"
|
||||
${WriteRegDWORD2} $TmpVal "$0" "Create Quick Launch Shortcut" 1 0
|
||||
${Else}
|
||||
${WriteRegDWORD2} $TmpVal "$0" "Create Quick Launch Shortcut" 0 0
|
||||
|
@ -544,7 +543,7 @@
|
|||
; Delete gopher from the user's UrlAssociations if it points to FirefoxURL.
|
||||
StrCpy $0 "Software\Microsoft\Windows\Shell\Associations\UrlAssociations\gopher"
|
||||
ReadRegStr $2 HKCU "$0\UserChoice" "Progid"
|
||||
${If} $2 == "FirefoxURL"
|
||||
${If} "$2" == "FirefoxURL"
|
||||
DeleteRegKey HKCU "$0"
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
|
|
@ -3093,6 +3093,7 @@
|
|||
|
||||
/**
|
||||
* Checks if a handler's open command points to this installation directory.
|
||||
* Uses SHCTX to determine the registry hive (e.g. HKLM or HKCU) to check.
|
||||
*
|
||||
* @param _HANDLER_NAME
|
||||
* The registry name for the handler.
|
||||
|
@ -3126,7 +3127,7 @@
|
|||
|
||||
StrCpy $R8 "$R9"
|
||||
StrCpy $R9 "false"
|
||||
ReadRegStr $R7 HKCR "$R8\shell\open\command" ""
|
||||
ReadRegStr $R7 SHCTX "Software\Classes\$R8\shell\open\command" ""
|
||||
StrCmp "$R7" "" end
|
||||
|
||||
${GetPathFromString} "$R7" $R7
|
||||
|
|
Загрузка…
Ссылка в новой задаче