summaryrefslogtreecommitdiffstats
path: root/browser/installer/windows/nsis/uninstaller.nsi
diff options
context:
space:
mode:
Diffstat (limited to 'browser/installer/windows/nsis/uninstaller.nsi')
-rwxr-xr-xbrowser/installer/windows/nsis/uninstaller.nsi57
1 files changed, 6 insertions, 51 deletions
diff --git a/browser/installer/windows/nsis/uninstaller.nsi b/browser/installer/windows/nsis/uninstaller.nsi
index 695beed25f..31bd992047 100755
--- a/browser/installer/windows/nsis/uninstaller.nsi
+++ b/browser/installer/windows/nsis/uninstaller.nsi
@@ -411,54 +411,6 @@ SectionEnd
################################################################################
# Uninstall Sections
-/**
- * Deletes the registry keys for a protocol handler but only if those registry
- * keys were pointed to the installation being uninstalled.
- * Does this with both the HKLM and the HKCU registry entries.
- *
- * @param _PROTOCOL
- * The protocol to delete the registry keys for
- */
-!macro DeleteProtocolRegistryIfSetToInstallation _PROTOCOL
- Push $0
- Push $1
- ; Check if there is a protocol handler registered by fetching the DefaultIcon value
- ; in the registry.
- ; If there is something registered for the icon, it will be the path to the executable,
- ; plus a comma and a number for the id of the resource for the icon.
- ; Use StrCpy with -2 to remove the comma and the resource id so that
- ; the whole path to the executable can be compared against what's being
- ; uninstalled.
-
- ; Do all of that twice, once for the local machine and once for the current user
-
- ; Remove protocol handlers
- ClearErrors
- ${un.GetLongPath} "$INSTDIR\${FileMainEXE}" $1
- ReadRegStr $0 HKLM "Software\Classes\${_PROTOCOL}\DefaultIcon" ""
- ${If} $0 != ""
- StrCpy $0 $0 -2
- ${If} $0 == $1
- DeleteRegKey HKLM "Software\Classes\${_PROTOCOL}"
- ${EndIf}
- ${EndIf}
-
- ClearErrors
- ReadRegStr $0 HKCU "Software\Classes\${_PROTOCOL}\DefaultIcon" ""
- ${If} $0 != ""
- StrCpy $0 $0 -2
- ${If} $0 == $1
- DeleteRegKey HKCU "Software\Classes\${_PROTOCOL}"
- ${EndIf}
- ${EndIf}
-
- ClearErrors
-
- Pop $0
- Pop $1
-!macroend
-!define DeleteProtocolRegistryIfSetToInstallation '!insertmacro DeleteProtocolRegistryIfSetToInstallation'
-
Section "Uninstall"
SetDetailsPrint textonly
DetailPrint $(STATUS_UNINSTALL_MAIN)
@@ -571,9 +523,12 @@ Section "Uninstall"
; Clean up "launch on login" registry key for this installation.
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Mozilla-${AppName}-$AppUserModelID"
- ; Remove dual browser extension protocol handlers
- ${DeleteProtocolRegistryIfSetToInstallation} "firefox"
- ${DeleteProtocolRegistryIfSetToInstallation} "firefox-private"
+ ; Remove FirefoxBridge extension protocol handlers
+ Push $1
+ ${un.GetLongPath} "$INSTDIR\${FileMainEXE}" $1
+ ${DeleteProtocolRegistryIfSetToInstallation} "$1" "firefox-bridge"
+ ${DeleteProtocolRegistryIfSetToInstallation} "$1" "firefox-private-bridge"
+ Pop $1
; Remove old protocol handler and StartMenuInternet keys without install path
; hashes, but only if they're for this installation. We've never supported