Last Comment Bug 720521 - MozillaMaintenance service does not get uninstalled when Firefox is uninstalled
: MozillaMaintenance service does not get uninstalled when Firefox is uninstalled
Status: VERIFIED FIXED
[qa!]
:
Product: Firefox
Classification: Client Software
Component: Installer (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: Firefox 12
Assigned To: Brian R. Bondy [:bbondy]
:
Mentors:
Depends on: 735177
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-23 15:01 PST by Brian Smith (:briansmith, :bsmith, use NEEDINFO?)
Modified: 2012-04-02 07:11 PDT (History)
13 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
unaffected
verified
verified


Attachments
Patch v1. (2.81 KB, patch)
2012-01-31 17:42 PST, Brian R. Bondy [:bbondy]
jmathies: review+
Details | Diff | Splinter Review
Patch v2. (3.27 KB, patch)
2012-02-06 07:37 PST, Brian R. Bondy [:bbondy]
netzen: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Brian Smith (:briansmith, :bsmith, use NEEDINFO?) 2012-01-23 15:01:24 PST
+++ This bug was initially created as a clone of Bug #715489 +++

When Firefox is installed, the service gets installed. Therefore, when it gets uninstalled, the service must get uninstalled, unless there is some other product using it.

Users expect that if they install some software, and then uninstall it, that there system will be in the same state they left it in. Especially, they do not expect to leave a useless (as far as their current system configuration is concerned) and un-updatable service installed.
Comment 1 Robert Strong [:rstrong] (use needinfo to contact me) 2012-01-23 15:06:57 PST
Planned to do after other work is completed but not a blocker IMO since it can be uninstalled from programs and features or add / remove programs. This will be entirely implemented in the installer / uninstaller for the service which is part of Firefox -> Installer so moving over there.
Comment 2 Brian R. Bondy [:bbondy] 2012-01-23 15:12:53 PST
I agree with your point about it being of no use, so should be uninstalled if nothing else is using it.

This can be implemented by checking:
HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\MaintenanceService

If it has no subitems at the end of the uninstall process then the firefox uninstaller should launch the service uninstaller with the /S argument which makes it silent.
Comment 3 Brian R. Bondy [:bbondy] 2012-01-31 17:42:53 PST
Created attachment 593276 [details] [diff] [review]
Patch v1.

How things work before this patch:
- When the Firefox installer is run, it puts an entry in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\MaintenanceService which is a hash of the installed path
- When the Firefox uninstaller is run, it removes that hashed entry from the registry.

How things work after this patch:
- All of the above remains true
- If it detects that HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\MaintenanceService has no subkeys, then it will figure out the maintenance service uninstaller path and execute it.
- As with all NSIS executables, it just passes /S to execute the uninstaller silently.
- If it detects the registry has some subkeys, it doesn't do anything extra.
Comment 4 Jim Mathies [:jimm] 2012-02-06 07:13:07 PST
Comment on attachment 593276 [details] [diff] [review]
Patch v1.

Review of attachment 593276 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/installer/windows/nsis/uninstaller.nsi
@@ +200,5 @@
>  ; Use the default dialog for IDD_VERIFY for a simple Banner
>  ChangeUI IDD_VERIFY "${NSISDIR}\Contrib\UIs\default.exe"
>  
> +!define MaintUninstallKey \
> + "Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService"

Lets move this to the top of the file.
Comment 5 Brian R. Bondy [:bbondy] 2012-02-06 07:37:26 PST
Created attachment 594710 [details] [diff] [review]
Patch v2.

Thanks for the review, implemented nits.  Will push once it passes try.  Carrying forward r+.
Comment 6 Brian R. Bondy [:bbondy] 2012-02-06 10:46:00 PST
http://hg.mozilla.org/integration/mozilla-inbound/rev/13a727964b5d
Comment 7 Ed Morley [:emorley] 2012-02-07 12:14:42 PST
https://hg.mozilla.org/mozilla-central/rev/13a727964b5d
Comment 8 Brian R. Bondy [:bbondy] 2012-02-13 06:43:26 PST
Comment on attachment 594710 [details] [diff] [review]
Patch v2.

[Approval Request Comment]
Regression caused by (bug #): 481815.  Not really a regression but would be nice to land with the service.
User impact if declined: Users will have to uninstall the Mozilla Maintenance Service manually from control panel.  Some users may be unhappy that we leave traces after uninstall.
Testing completed (on m-c, etc.): Yes I've tried it on mozilla-central nightly. 
Risk to taking this patch (and alternatives if risky): Low
String changes made by this patch: None.
Comment 9 Alex Keybl [:akeybl] 2012-02-14 11:25:40 PST
Comment on attachment 594710 [details] [diff] [review]
Patch v2.

[Triage Comment]
In support of our new update work, and may cause user frustration, so approving for Aurora 12.
Comment 10 Brian R. Bondy [:bbondy] 2012-02-14 16:02:45 PST
Pushed to aurora:
http://hg.mozilla.org/releases/mozilla-aurora/rev/68abb9fd7d6c
Comment 11 Paul Silaghi, QA [:pauly] 2012-03-30 07:45:18 PDT
(In reply to Brian Smith (:bsmith) from comment #0)
> When Firefox is installed, the service gets installed. Therefore, when it
> gets uninstalled, the service must get uninstalled, unless there is some
> other product using it.

Still an issue on FF 12b3. What other products might be using this service?
Comment 12 Brian R. Bondy [:bbondy] 2012-03-30 08:33:58 PDT
Which OS are you testing from?  Have you seen bug 735177?
By the way before testing this please ensure you first clear out HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\MaintenanceService in case you had a previous unclean uninstall.
Comment 13 Paul Silaghi, QA [:pauly] 2012-04-02 04:41:02 PDT
Mozilla Maintenance Service is removed after Firefox is uninstalled. If there are more products using the service, it is removed after all products are uninstalled.
Verified fixed on Win 7, Win 7/64.
Still an issue on Win XP, but I suppose bug 735177 is dealing with this problem.

One question though. After uninstalling Firefox and the service is gone, HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\MaintenanceService still present in the registry. Is this correct ?
Comment 14 Brian R. Bondy [:bbondy] 2012-04-02 06:52:39 PDT
Yes that is correct and as expected.  That registry location stores that the service was installed at one point so that future updates do not re-install the service.
Comment 15 Paul Silaghi, QA [:pauly] 2012-04-02 07:11:36 PDT
Based on comment 14 marking the bug as verified fixed on FF 12 & 13.

Note You need to log in before you can comment on or make changes to this bug.