Bug 735177 - Windows XP does not trigger Maintenance Service Uninstaller when installing product. r=rstrong
This commit is contained in:
@@ -225,7 +225,9 @@ Section "MaintenanceService"
|
||||
; this value to determine if we should show the service update pref.
|
||||
; Since the Maintenance service can be installed either x86 or x64,
|
||||
; always use the 64-bit registry for checking if an attempt was made.
|
||||
SetRegView 64
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
|
||||
WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Installed" 1
|
||||
|
||||
@@ -234,7 +236,9 @@ Section "MaintenanceService"
|
||||
; check from the service so that tests can be run.
|
||||
; WriteRegStr HKLM "${FallbackKey}\0" "name" "Mozilla Corporation"
|
||||
; WriteRegStr HKLM "${FallbackKey}\0" "issuer" "Thawte Code Signing CA - G2"
|
||||
SetRegView lastused
|
||||
${If} ${RunningX64}
|
||||
SetRegView lastused
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
; By renaming before deleting we improve things slightly in case
|
||||
@@ -273,8 +277,12 @@ Section "Uninstall"
|
||||
|
||||
DeleteRegKey HKLM "${MaintUninstallKey}"
|
||||
|
||||
SetRegView 64
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "Installed"
|
||||
DeleteRegKey HKLM "${FallbackKey}\"
|
||||
SetRegView lastused
|
||||
${If} ${RunningX64}
|
||||
SetRegView lastused
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
@@ -121,10 +121,14 @@
|
||||
; We check to see if the maintenance service install was already attempted.
|
||||
; Since the Maintenance service can be installed either x86 or x64,
|
||||
; always use the 64-bit registry for checking if an attempt was made.
|
||||
SetRegView 64
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
ReadRegDWORD $5 HKLM "Software\Mozilla\MaintenanceService" "Attempted"
|
||||
ClearErrors
|
||||
SetRegView lastused
|
||||
${If} ${RunningX64}
|
||||
SetRegView lastused
|
||||
${EndIf}
|
||||
|
||||
; If the maintenance service is already installed, do nothing.
|
||||
; The maintenance service will launch:
|
||||
@@ -618,12 +622,15 @@
|
||||
; with at most one certificate. A fallback certificate can only be used
|
||||
; if the binary is replaced with a different certificate.
|
||||
; We always use the 64bit registry for certs.
|
||||
; This call is ignored on 32-bit systems.
|
||||
SetRegView 64
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
DeleteRegKey HKLM "$R0"
|
||||
WriteRegStr HKLM "$R0\0" "name" "${CERTIFICATE_NAME}"
|
||||
WriteRegStr HKLM "$R0\0" "issuer" "${CERTIFICATE_ISSUER}"
|
||||
SetRegView lastused
|
||||
${If} ${RunningX64}
|
||||
SetRegView lastused
|
||||
${EndIf}
|
||||
ClearErrors
|
||||
${EndIf}
|
||||
; Restore the previously used value back
|
||||
|
||||
@@ -214,7 +214,9 @@ Function un.UninstallServiceIfNotUsed
|
||||
Push $1
|
||||
|
||||
; The maintenance service always uses the 64-bit registry on x64 systems
|
||||
SetRegView 64
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
|
||||
; Figure out the number of subkeys
|
||||
StrCpy $0 0
|
||||
@@ -225,7 +227,9 @@ loop:
|
||||
goto loop
|
||||
doneCount:
|
||||
; Restore back the registry view
|
||||
SetRegView lastUsed
|
||||
${If} ${RunningX64}
|
||||
SetRegView lastUsed
|
||||
${EndIf}
|
||||
${If} $0 == 0
|
||||
; Get the path of the maintenance service uninstaller
|
||||
ReadRegStr $1 HKLM ${MaintUninstallKey} "UninstallString"
|
||||
@@ -434,10 +438,13 @@ Section "Uninstall"
|
||||
Pop $MaintCertKey
|
||||
${If} $MaintCertKey != ""
|
||||
; We always use the 64bit registry for certs
|
||||
; This call is ignored on 32-bit systems.
|
||||
SetRegView 64
|
||||
DeleteRegKey HKLM "$MaintCertKey\"
|
||||
SetRegView lastused
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
DeleteRegKey HKLM "$MaintCertKey"
|
||||
${If} ${RunningX64}
|
||||
SetRegView lastused
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
Call un.UninstallServiceIfNotUsed
|
||||
!endif
|
||||
|
||||
Reference in New Issue
Block a user