Firefox error resolved: One or more files could not be updated
I have automatic updates enabled in Firefox. For my day-to-day work, I run as a non-administrator user in Windows XP. I need to log in as an administrator whenever I want to install new software - including updates for Firefox.
The problem is that Firefox is not content to just update all necessary files when you are logged in as the administrator. When you return to your non-admin account and launch Firefox, you may be greeted with the following message:
"One or more files could not be updated. Please make sure all other applications are closed and that you have permission to modify files, and then restart Firefox to try again."
You can click through the message, and Firefox will launch anyway. Okay, I guess the updates weren't that important and I can ignore the message. However, the next time I launch Firefox, and am again prompted and again click through it. It seems I am doomed to launching Firefox with two clicks for all eternity.
Of course I searched the internet for the error message, but nothing very fruitful came of it. Apparently the error has a number of different causes. I did find some others reporting the problem when run as a non-administrator, but the solution was always "just run as administrator" or "elevate your rights".
I finally solved the problem without changing any rights for my user account, and am now posting it here in hopes that others will find it useful.
UPDATE: Based on suggestions in the comments, I've started using a much simpler method. If you have an administrator password, you can run the following command in a Command Prompt:
runas /user:Administrator /noprofile /env "C:\Program Files\Mozilla Firefox\firefox.exe"
The rest of this article is unnecessary if you want to follow this "delete the updates folder" approach.
Note: you must be able to log in as an administrator on the computer, but your primary user account does not have to be an administrator.
Pre-requisite: As an administrator, download and install Process Monitor from Sysinternals/Microsoft.
- Close all running instances of Firefox.
- Open an Administrator command prompt by right-clicking on a Command Prompt icon, choose Run As... and enter the credentials of a user with administrator rights.
- Launch Process Monitor from the administrator command prompt by typing the full path to the executable (wherever you installed it). For example: c:\apps\procmon.exe (tab completion can be very helpful for this step).
- Within Process Monitor, turn off "Show Registry Activity" and "Show File System Activity" from the toolbar. Only "Show Process and Thread Activity should be enabled". This step is not absolutely necessary, but it will eliminate a lot of extra noise.
- Start Firefox, and click through the "Software Update Failed" dialog until the browser opens.
- Switch back to Process Monitor and press CTRL-E or the click the toolbar button to stop capturing events. Close any Firefox windows that might be open.
- Scroll through the list of processes and double-click on the first instance of "updater.exe" (it should have the value "Process Start" in the Operation column). Switch to the Process tab of the Event Properties window that opens.
- Select the entire contents of the "Command Line:" textbox and copy it (CTRL-C or right-click, Copy). It should look something like this (all one line): "C:\Documents and Settings\Josh\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox\updates\0\updater.exe" "C:\Documents and Settings\Josh\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox\updates\0" "3824" "C:\Program Files\Mozilla Firefox" "C:\Program Files\Mozilla Firefox\firefox.exe"
- Switch back to the administrator command prompt and right-click, Paste to paste the command-line. Press Enter.
- You should see a dialog indicating that Firefox is updating. Close the browser that opens since it is still running as the administrator.
- Now open Firefox normally. It should start up without the annoying error message.
I'm not sure if the command-line from step 8 is always the same (the "3824" is the only part I can imagine would vary). If it is always the same, you can save a lot of steps on subsequent updates by just creating a batch file with that command and running it as administrator. If anyone has any insight to the parameters of this command, let me know.
Comments
2) (logged in as standard user, not administrator) delete this folder:
C:\Documents and Settings\%username%\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox
> I'm not sure if the command-line from step 8 is always the same (the "3824"
> is the only part I can imagine would vary).
Thanks for the solution; it worked perfectly. On the system I just had to fix, the number happened to be "3324". If it happens again on the same computer (and under the same user name) I wonder if the number will change.
The "3824" was the Parent process ID I think, so it will change each time, but doesn't seem to be important as that process is gone when you launch this from command line per your instructions... I'd imagine you could just put "9999" or whatever into a script and I might work (haven't tried it).
The only problem I had with your fix came at step 9. When I tried to run from admin prompt I kept getting 'access denied' messages. Eventually I just tried it from the regular, non-admin prompt and it worked fine. I did tweak a few things in between though and can't say if they had any effect (changed some permissions, etc.).
Anyway, thanks again for this post.
Brett
I tried removing FF and reinstalling (but the users' local settings folder wasn't cleaned out so kept trying to launch updates unsuccessfully). I tried giving all users Full Control NTFS permission on the Firefox folder but again, they didn't have the permission to even run the updates in the first place. This worked but the pain in the butt is having to have all users rename their folder manually. Well, it's that or doing it for them which would have taken an hour which we didn't have.
I've been looking all over for this solution but it finally works. Finally!
It annoyed me for a long time, but now it works perfectly. :)
I solved this one, as a limited user clear the contents of \0 folder. also if you have the \profile folder remove this folder, that's it. I didn't have the above error message pop up again since. It worked mine.
1) launch Firefox as administrator and update it;
2) (logged in as standard user, not administrator) delete this folder:
C:\Documents and Settings\%username%\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox
*************************
It works perfectly. Thank you!.
That worked perfectly.
I actually solved the problem by logging on as Admin user and checking the access permissions on the "C:\Program Files\Mozilla Firefox" folder. The "Users" group was only allowed
1. Read & Execute
2. List Folder Contents
3. Read
access permissions. I added "Modify" which automatically included "Write" permission.
Logged back on as a normal User level user.
Span Firefox up again and the update went through without a problem, also including all the addin checking that is part of a proper update.
Can I suggest that you try this first before going through all the above hoops.
On a cautionary note, I am fairly sure I did this as part of the last update so there may be something that is part of the update process which when run on your Admin account re-sets the permissions on Mozilla Firefox folder back to the state that causes this problem to normal User level users when they come to run the update. So you may need to make this a regular part of your Firefox update process. So if this works for you "MAKE NOTES FOR THE NEXT TIME".
I agree my solution is not really viable for non-technical users. Your solution is definitely the most straight forward if you are not concerned about the security implications. It was good to point out, so that readers know they have other options. Thanks!
Even as an administrator, however, Josh's first solution is too complicated for me. \ I don't understand what all that accomplishes. I opted for the simpler "delete these user files" approach.
My solution is way too complicated, but it was the only thing I could come up with to make that annoying dialog go away. My post also provides a place for everyone else having the problem to find potential solutions.
Can anyone explain what's in that folder? I'd really appreciate it, especially if deleting it means reinstalling all the extensions every time Firefox needs updating.
"I solved this one, as a limited user clear the contents of \0 folder. also if you have the \profile folder remove this folder, that's it. I didn't have the above error message pop up again since. It worked mine."
As an experiment, I just renamed the \Documents and Settings\%username%\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox\updates\0 folder. (I think that's the one you're refering to, right Tiks?) I didn't have to use administrative login for anything, and I didn't bother with the \Application Data\Mozilla\Firefox\profile folder. As soon as I restarted firefox, the installation ran, and a new \0 folder was added, so I guess that sort of answers my previous question. As for extensions, I didn't have any, so I don't know if they would have been nuked or not.
copy-past the script below in a file named like "delete_firefox_folder.vbs"
'Check on all the user profiles where the folder of the profile are less then 5 caracters and then,
'Delete the folder Mozilla if existe in the path "C:\Documents and Settings\<initials>\Local Settings\Application Data\"
Set FSO = CreateObject("Scripting.FileSystemObject")
ShowSubfolders FSO.GetFolder("C:\Documents and Settings")
'Enumerating all the folder include the subfolders
Sub ShowSubfolders(Folder)
For Each Subfolder In folder.subfolders
folder_name = right(Subfolder.path,len(Subfolder.path)-InStrRev(Subfolder.path,"\"))
If len(folder_name) < 5 Then
If (FSO.FolderExists(Subfolder.path+"\Local Settings\Application Data\Mozilla")) Then
FSO.DeleteFolder(Subfolder.path+"\Local Settings\Application Data\Mozilla"), True
End If
End If
Next
End Sub
Dom
In the command line of the limited user, paste and execute the following line:
runas /user:Administrator /noprofile /env "C:\Program Files\Mozilla Firefox\firefox.exe"
The "/noprofile" and "/env" flags will launch Firefox with administrator permissions but without loading the Administrator's profile and will continue to use the current environment. Firefox will then update as necessary and open a browser window. Firefox can then be restarted with the limited user's permissions and will cease to complain.
Justins last trick seems the most reasonable to me, and it works wonders. Just remember you have to have the Administrator password at hand (of course). Thanks.
{
Update();
}
Else
{
WarnUpdateAvailable;
}
Cmon Mozilla team, how hard can this be?
http://woodruffrc.com/allow-non-admin-users-to-update-firefox.html
Melissa