Closed Bug 338931 Opened 18 years ago Closed 18 years ago

Win32 installer should cleanup old / bogus registry entries on install and uninstall

Categories

(Firefox :: Installer, defect)

2.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 2 beta1

People

(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)

References

Details

(Keywords: fixed1.8.1, Whiteboard: 1d)

Attachments

(2 files, 3 obsolete files)

Due to allowing multiple installs of the same app and use the app version in an attempt to keep the registry keys unique the installer is prone to leave old / unused registry keys behind. The installer and uninstaller should enumerate the registry keys looking for an install location that matches its install location and cleanup the entries it leaves behind.
No longer blocks: 326580
Assignee: nobody → robert.bugzilla
Whiteboard: 1d
Target Milestone: --- → Firefox 2 beta1
Version: Trunk → 2.0 Branch
Flags: blocking-firefox2+
I am going to fix bug 339272 and bug 338890 in this same patch since they both heavily touch the same parts of the files.

note: we do funky things in the registry... for example, when an install occurs we write to both HKLM and HKCU yet I am quite sure I had an app update only update my HKLM keys. When an app update occurs it can and does change key names so the keys in the uninstall log may be bogus or worse refer to a side by side install that happens later.

Instead of using an uninstall log for well known registry keys I am going to enumerate / validate / remove as appropriate since with the way we do things I can't rely on the uninstall log for these keys. Arghhh... but it is the right thing to do under these circumstances.
Summary: Win32 installer should cleanup old registry entries on uninstall → Win32 installer should cleanup old / bogus registry entries on uninstall
Summary: Win32 installer should cleanup old / bogus registry entries on uninstall → Win32 installer should cleanup old / bogus registry entries on install and uninstall
Attached patch almost there (obsolete) — Splinter Review
Attached patch very close (obsolete) — Splinter Review
Attachment #224527 - Attachment is obsolete: true
Comment on attachment 224671 [details] [diff] [review]
very close

I can't claim to understand everything in this patch, but robert has explained bits and pieces of how it works (and how NSIS works) and I'm slowly coming to speed.

r=sspitzer based on the little I do know.
Attached patch patch (obsolete) — Splinter Review
Attachment #224671 - Attachment is obsolete: true
Attachment #224897 - Flags: review?(benjamin)
Comment on attachment 224897 [details] [diff] [review]
patch

Ugh, all this stack manipulation is painful. Could you comment it a bit? Looking at CreateRegKey it's not at all clear to me what all the pushing/popping at the beginning/end actually does.
Will do. btw: there is another option re: CreateRegKey - instead we could create a regvalue which will auto create the key and then delete the value. Would you prefer that?
This just contains the changes to common.nsh. I added a section to the top of the file that hopefully explains in enough detail the whats and whys for Exch, Push, and Pop on the stack. I'll submit a complete patch after Bug 340864 lands that includes the changes required for this patch. Thanks!
Comment on attachment 224945 [details] [diff] [review]
common.nsh w/ additional comments

Benjamin, if you could let me know if the comments as they stand in common.nsh are sufficient I would appreciate it.
Attachment #224945 - Flags: review?(benjamin)
Comment on attachment 224945 [details] [diff] [review]
common.nsh w/ additional comments

Better... my brain is still feeling the pinch.
Attachment #224945 - Flags: review?(benjamin) → review+
Attachment #224897 - Flags: review?(benjamin)
Comment on attachment 224897 [details] [diff] [review]
patch

Benjamin, are you ok with this patch if it contains the changes to common.nsh in the other patch you r+'d?

Also, do you want me to land this before the remove xpinstall installer patch?
Attachment #224897 - Flags: review?(benjamin)
Attachment #224897 - Flags: review?(benjamin)
Benjamin, I wasn't sure if you wanted to review the full patch so here it is. Thanks!
Attachment #224897 - Attachment is obsolete: true
Attachment #225240 - Flags: review?(benjamin)
Attachment #225240 - Flags: review?(benjamin) → review+
Checked in on trunk
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Attachment #225240 - Flags: approval-branch-1.8.1?(benjamin)
Attachment #225240 - Flags: approval-branch-1.8.1?(benjamin) → approval-branch-1.8.1+
Checked in on MOZILLA_1_8_BRANCH
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: