How to trigger a check for updates in Firefox programatically or from a command line?
Is there a command line switch for firefox.exe or an "about:" URL that will either force an update check or at least display the Help/About dialog, which checks for updates and tells if you're running the latest version?
One site claimed that the "about:" URL was the same as menu Help -> About, but it's not.
I built a program to automate the updating of various programs on my machine, and most programs have command line tools for checking for updates. Windows update has wuauclt.exe
, Java has jucheck.exe
. For some applications, I can even automate the interface, but it's difficult in Firefox, because the main window title is unpredictable (it depends on which web page is active), and all Firefox windows seem to use the exact same window class name.
The trick is to download the partial update (.MAR) file and running the updater via the command line.
Check the detailed article Software Update:Manually Installing a MAR file at MozillaWiki. It explains the sources to acquire the MAR files from, which is something you may want to automate as well, as the links are fairly well structured/canonicalized), as well as the steps to execute the installer.
The later versions of FireFox comes with it's own silent update service - Mozilla Maintenance Service
Reference: https://wiki.mozilla.org/Windows_Service_Silent_Update
Though I haven't figured out how to automatically check for updates via command line, I did find a way to automatically check whether the latest version you've identified is on a workstation via batch. I use it at my work to update ~200 workstations. At the time I'm writing this, 33.1.1 is the latest version, but you can modify it as needed. I check for the version, and then if the workstation needs to be updated, I run the .exe stub which I've saved on my local network.
For XP, it's:
echo Checking Firefox
Reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s | find "Firefox" | find "Mozilla Firefox 33.1.1"
IF %ERRORLEVEL% == 0 (echo You have Firefox 33.1.1) ELSE (echo Installing Firefox 33.1.1 & "\\PATH\TO\FILE\Firefox Setup Stub 33.1.1.exe")
and for Windows 7 it's:
echo checking Firefox
Reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" /s | find "Firefox" | find "Mozilla Firefox 33.1.1"
IF %ERRORLEVEL% == 0 (echo You have Firefox 33.1.1) ELSE (echo Installing Firefox 33.1.1 & "\\PATH\TO\FILE\\Firefox Setup Stub 33.1.1.exe")