diff --git a/browser/installer/windows/nsis/uninstaller.nsi b/browser/installer/windows/nsis/uninstaller.nsi index 909d0920e32..109945e3771 100755 --- a/browser/installer/windows/nsis/uninstaller.nsi +++ b/browser/installer/windows/nsis/uninstaller.nsi @@ -104,6 +104,7 @@ VIAddVersionKey "FileDescription" "${BrandShortName} Helper" !insertmacro RegCleanAppHandler !insertmacro RegCleanMain !insertmacro RegCleanUninstall +!insertmacro SetBrandNameVars !insertmacro UnloadUAC !insertmacro WriteRegDWORD2 !insertmacro WriteRegStr2 diff --git a/toolkit/mozapps/installer/windows/nsis/common.nsh b/toolkit/mozapps/installer/windows/nsis/common.nsh index 94cad2ba539..1535ce72121 100755 --- a/toolkit/mozapps/installer/windows/nsis/common.nsh +++ b/toolkit/mozapps/installer/windows/nsis/common.nsh @@ -4441,6 +4441,10 @@ !define UninstallOnInitCommon "!insertmacro UninstallOnInitCommonCall" Function UninstallOnInitCommon +; Prevents breaking Thunderbird +!ifdef SetBrandNameVars + ${SetBrandNameVars} "$EXEDIR\distribution\setup.ini" +!endif ; Prevent launching the application when a reboot is required and this ; executable is the main application executable @@ -4454,6 +4458,11 @@ IfFileExists "$INSTDIR\${FileMainEXE}" +2 +1 Quit ; Nothing initialized so no need to call OnEndCommon +; Prevents breaking Thunderbird +!ifdef SetBrandNameVars + ${SetBrandNameVars} "$INSTDIR\distribution\setup.ini" +!endif + ; Prevent all operations (e.g. set as default, postupdate, etc.) when a ; reboot is required and the executable launched is helper.exe IfFileExists "$INSTDIR\${FileMainEXE}.moz-upgrade" +1 +4