The Inside Track on Firefox Development.
« Clark Campaign Uses Firebird and Thunderbird | Main | 3 DAYS »
February 6, 2004
Installer Deleting Files
So there's been quite a bit of controversy about Firebird's installer, which inherits an interesting function from Seamonkey designed to prevent against file conflicts when installing over the top of an existing version. Here's the problem.
Say you install Firebird into
C:\Program Files\
(directly into that directory, not into a subfolder so that the executable and other files live in C:\Program Files\)
... and then install another build, and choose the Custom install path, and choose "Clean Install", the entire contents of C:\Program Files\ is removed. Bye bye, programs.
This function was introduced in the original Seamonkey installer years ago. The dialog it presented when it found an existing installation in the directory contained a bunch of text, which read:
"Uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga uga buga"
And had two buttons, one labeled "Uga" and the other labeled "Buga"
By this I mean the dialog presented a concept so dizzyingly complicated to your average user with a sufficient quantiy of text and obscure pathways that there is a 50% probability that the user would pick the wrong choice and delete all their programs. Since this dialog was so poorly worded no one really figured this one out. Mozilla has shipped every version it has released with the installer with this issue, as has every Netscape release in memory. Mozilla continues to ship this problem today.
Firebird 0.8 features a new front end on the Seamonkey installer, and out of perceived necessity included this panel, although for the first time what was happening was explained in a clear, easy to understand fashion.
Now, it's a big deal, a critical failure of the installer, a huge regression in my code. Um, no. OK, so it might be a bit stupid, and I've finally pulled the "safe upgrade" feature altogether, but this has been shipping in Mozilla for years, and continues to be shipped, and no one gave a rats ass.
I suppose I should take it as a compliment that I've finally made one of the horrors of Mozilla accessible to one and all :-P
My line on this issue remains that it's silly to install any application into a folder that contains other data, asking for trouble, system instability and other problems. This option is shut off from regular users who will just choose "Easy Install". It is only the people who think they know what they're doing but really don't that get tripped up.
Posted by ben at February 6, 2004 1:31 AM
Comments
Of course, the current 'controversy' has been triggered by the fact that the *default* install directory changed from ${PROGRAM}/mozilla.org (or whatever) to just ${PROGRAM} - i.e., making Program Files the default.
Posted by: Malcolm at February 6, 2004 2:39 AM
At least now more people know about this flaw. While, I don't defend those people who installed it to c:\program files or whatever (idiots). I do have to say that this is a bit of a nasty bug, just for the fact that it allows you to delete files unrelated to firebird.
Can't wait for 0.8 :) Keep up the good work!
Posted by: Zach at February 6, 2004 2:48 AM
I agree with you but ... why wait so long before exposing this info ?
Posted by: Jean-Marc Gillet at February 6, 2004 5:12 AM
Why can't Firebird's default installation directory be this (at least on Windows):
C:/Program Files/mozilla.org/Firebird/
Simple, easy to organize especially concerning future mozilla.org products (Thunderbird would be installed in C:/Program Files/mozilla.org/Thunderbird/) and there is no confusion. Plus I imagine it would make moving to the GRE a little easier.
The last thing I want is 5 folders in C:/Program Files/ for five different mozilla products. That is a Microsoft tactic and it just plain sucks. Organize it all under the mozilla.org folder where it belongs.
Posted by: Chris G. at February 6, 2004 7:22 AM
I agree with the post above me (chirs).
While the feature IS usefull, there needs to be a meaningful and correct default location Firebird installs to, and I have to agree;
C:/Program Files/mozilla.org/Firebird/
would be the best choice.
Posted by: Jed at February 6, 2004 9:22 AM
this makes me ask the usual question :): What do installer of other apps in this case?
Posted by: mcsmurf at February 6, 2004 10:13 AM
Most Windows installers apply two different methods to specify a non-default location:
1. a manual entry field
2. a 'browse' button, coupled to a tree view
Method 1 usually does not protect users from making stupid mistakes, such as installing to "C:\Program Files" or "C:\". On the other hand, using method 2, installers will usually provide extra protection by automatically appending an application directory. E.g. if the user browses to "C:\Program Files", the target directory will be set to "C:\Program Files\AppName". Many installers then allow this path to be edited in the manual entry field.
As the Firebird installer only uses the second method, the logical thing to do would be to always append "\MozillaFirebird" to the selected directory. This would not only solve the whole issue rightaway, but it is also more or less a standard feature for Windows installers.
(If a future version of the installer will have a manual edit box, additional protection against deleting anything in a root-directory of a partition or in "*\Program Files" should be considered, imho.)
Posted by: MORA at February 6, 2004 10:31 AM
Also, most uninstallers will not touch any '3rd-party' directories in the application folder, so if a user is stupid enough to install an application to "Program Files" the other programs in that folder are still relatively safe. Most uninstallers issue a warning when they can't delete the complete program directory (e.g. due to the presence of other directories). I have tested this recently with several applications.
Posted by: MORA at February 6, 2004 10:38 AM
Thanks for the clarification and explanation on this.
Posted by: Robert Accettura at February 6, 2004 12:57 PM
Perhaps I'm just naive, but what about an installer that keeps a list of files it installs, and then any extensions that are installed add to that list? Then the uninstaller nukes only things in that list?
Posted by: Bo at February 6, 2004 2:32 PM
IMHO the problem was that when people saw C:\Program Files\ as installation destination, they were assuming that installer will create a new folder for the app. That's what most other win applications do. That's why it was a misleading behavior.
What can be done to protect against system files removal is a check for key system folders. And if the installation folder IS a system folder, never wipe it clean.
As to removing "stale" extensions, can content of installed-chrome file be of any help when performing upgrade?
Posted by: Walter K at February 6, 2004 7:33 PM
©1997-2006 Ben Goodger. All Rights Reserved.
Opinions expressed here are my own, and not those of any organization that I may be affiliated with.
Reload icon is © Stephen Horlander;
Firefox logo is by
Jon Hicks, and is a
trademark of The Mozilla Foundation.
GetFirefox buttons are from rakaz
