Fix Bug 569998 - No Mozilla Sunbird entry available in Add or Remove Programs in Control Panel. r=NPOTB
authorRobert Brand <mozrob@googlemail.com>
Sun, 23 Jan 2011 12:38:00 +0100
changeset 6994 66629a8ec1f5ac3d6809bff1875e9b726c1072d4
parent 6993 2e8f93800bcef5fdee1a65abd8f949b50ee4d52d
child 6995 6e981b8218f74c43e8fd8b0d6899a0c8f57dd9c6
push idunknown
push userunknown
push dateunknown
reviewersNPOTB
bugs569998
Fix Bug 569998 - No Mozilla Sunbird entry available in Add or Remove Programs in Control Panel. r=NPOTB
calendar/installer/windows/nsis/installer.nsi
--- a/calendar/installer/windows/nsis/installer.nsi
+++ b/calendar/installer/windows/nsis/installer.nsi
@@ -98,16 +98,17 @@ VIAddVersionKey "OriginalFilename" "setu
 !insertmacro GetPathFromString
 !insertmacro GetParent
 !insertmacro ManualCloseAppPrompt
 !insertmacro RegCleanMain
 !insertmacro RegCleanUninstall
 !insertmacro SetBrandNameVars
 !insertmacro UnloadUAC
 !insertmacro WriteRegStr2
+!insertmacro WriteRegDWORD2
 
 !include shared.nsh
 
 ; Helper macros for ui callbacks. Insert these after shared.nsh
 !insertmacro CheckCustomCommon
 !insertmacro InstallEndCleanupCommon
 !insertmacro InstallOnInitCommon
 !insertmacro InstallStartCleanupCommon
@@ -302,16 +303,20 @@ Section "-Application" APP_IDX
   ; We now try to add to HKLM and if that fails to HKCU
 
   ; The order that reg keys and values are added is important if you use the
   ; uninstall log to remove them on uninstall. When using the uninstall log you
   ; MUST add children first so they will be removed first on uninstall so they
   ; will be empty when the key is deleted. This allows the uninstaller to
   ; specify that only empty keys will be deleted.
   ${SetAppKeys}
+  
+  ; Uninstall keys can only exist under HKLM on some versions of windows. Since
+  ; it doesn't cause problems always add them.
+  ${SetUninstallKeys}
 
   ; These need special handling on uninstall since they may be overwritten by
   ; an install into a different location.
   StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}"
   ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0
   ${WriteRegStr2} $TmpVal "$0" "Path" "$INSTDIR" 0
 
   !insertmacro MUI_STARTMENU_WRITE_BEGIN Application