OpenSource-kb4 Silent installation and configuration of Firefox

From JBKB

Jump to: navigation, search

Install Firefox
Install Firefox

Version: 0.5.1
Difficult level: 2/5
Status: Working for Windows environment, Linux and Mac OS is needed to be added.

Contents

Introduction

Firefox can be customized in many way but it is unclear and less logic how to do these changes than for example Internet Explorer. Don't even bother to look for registry configurations of Firefox, because it uses config files such as ini and js files to do settings. There exists various ADM files to use to set GPO for firefox but none official and they can cause problems as well, but it is for sure worth trying.
This KB will show how to do a silent installation and configuration such as not make Firefox ask if it should be your default browser and disable updates as you might do in an environment where the users doesn't have permission to install updates anyway.

Windows environment

If you are in an environment with SMS/SCCM/SpecOps Deploy or another tool to distribute software it will already have rights to install, if not you need either to do a runas script or in another way make sure the script below is run with the rights it needs.

Install Firefox

This article was written when latest stable version was 3.0.7 so the command line to install it is as below

"~%dp0Firefox Setup 3.0.7.exe" -ms

~%dp0 - resolves to the fully expanded path to the directory containing the batch file
Firefox Setup 3.0.7.exe - Firefox installation files downloaded from http://www.getfirefox.com
-ms - Switch to make the installation silent

Disable bookmark import wizard

First time Firefox is started it runs the bookmark import wizard that I personally never use and therefor disable it by adding a file named override.ini in the %programfiles%\Mozilla Firefox\ folder with this content

[XRE]
EnableProfileMigrator=false

In the script we do the following command:

copy ~%dp0override.ini "%programfiles%\Mozilla Firefox\"

Don't make Firefox check to be default browser

This setting can be changed in a file called firefox.js located in %programfiles%\Mozilla Firefox\defaults\pref\ folder.
Either you modify with script the existing firefox.js or you do as this KB desribes your own firefox.js and overwrite the existing one (you just installed it so it is the default file anyway, it is not the user profile setting but the default system one).
Edit a firefox.js file and set the value below to false (default set to true).

pref("browser.shell.checkDefaultBrowser", false)

Then in your installation script type in:

copy /Y %~dp0firefox.js %programfiles%\Mozilla Firefox\defaults\pref\

copy /Y - overwrite the existing firefox.js file
~%dp0 - resolves to the fully expanded path to the directory containing the batch file

Don't make firefox go look for updates

This setting can be changed in a file called firefox.js located in %programfiles%\Mozilla Firefox\defaults\pref\ folder.
Either you modify with script the existing firefox.js or you do as this KB desribes your own firefox.js and overwrite the existing one (you just installed it so it is the default file anyway, it is not the user profile setting but the default system one).
Edit a firefox.js file and set the value below to false (default set to true).

pref("app.update.enabled", false);
pref("extensions.update.enabled", false);
pref("browser.search.update", false);

Then in your installation script type in:

copy /Y %~dp0firefox.js %programfiles%\Mozilla Firefox\defaults\pref\

copy /Y - overwrite the existing firefox.js file
~%dp0 - resolves to the fully expanded path to the directory containing the batch file

Final script

In a shared folder put the Firefox Setup 3.0.7.exe, the override.ini and the firefox.js in the same directory and create a batch file looking as below:

"~%dp0Firefox Setup 3.0.7.exe" -ms
copy ~%dp0override.ini "%programfiles%\Mozilla Firefox\"
copy /Y %~dp0firefox.js %programfiles%\Mozilla Firefox\defaults\pref\ 

That should do:

  • Silent installation of Firefox
  • Disable Bookmark import wizard
  • Make sure it doesn't ask to be default browser and look for updates.

GNU/Linux environment

Mac OS X environment

293 Rating: 3.5/5 (23 votes cast)

Personal tools