Difference between revisions of "Firefox"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(Basic installation)
(Add config for ESR 68.8.0, remove old ESR configs.)
 
(225 intermediate revisions by 72 users not shown)
Line 1: Line 1:
== Basic installation ==
+
This page is for Mozilla Firefox, available from [http://www.mozilla.com/en-US/firefox/central/ mozilla.com].
  
This is a silent installer and uninstaller for Mozilla Firefox 1.5, but it should work with other versions of Firefox, too.
+
== Installation ==
  
Note the high priority - Firefox should be installed before plugins, like [[Flash Player|Adobe Flash Player]] or [[Authorware Player|Adobe Authorware Player]] etc (or this coule be achieved with dependencies).
+
Link to latest Firefox installer at:
 +
* Classical: [ftp://ftp.mozilla.org/pub/firefox/releases/latest/win32/ ftp://ftp.mozilla.org/pub/firefox/releases/latest/win32/] or [http://www.mozilla.org/en-US/firefox/all.html webpage]
 +
* ESR: [http://www.mozilla.org/en-US/firefox/organizations/all.html http://www.mozilla.org/en-US/firefox/organizations/all.html]
  
As the Firefox installer now nicely upgrades and doesn't leave the old one in the registry, there is no need to differentiate versions in "package id".<br>
+
Command-line options for the installer are documented [https://wiki.mozilla.org/Installer:Command_Line_Arguments here], which also describes how to use a config.ini file for basic configuration of the Firefox install.
When a new version comes out, replace every occurrence of the version number in the installer file from, e.g. 1.5.0.4, with, e.g. 1.5.0.5 and then increment the package revision number.
+
  
Note that the Add/Remove Programs string of Firefox 1.5 is used for all subversions (1.5.0.4, 1.5.0.5 etc). We don't bump the package version number assuming that minor version upgrade works from Firefox itself. If we did, we would force reinstall on the people who already have Firefox automagically updated.
+
See [[Firefox#Customization]] for details on customizing the installation, installing extensions, and setting and locking preferences.
  
  <package  
+
The section below called [[firefox#Adding_the_settings_to_your_package_definition]] contains the extra lines you'll need to supply Firefox with a specific configuration.
    id="firefox"  
+
 
    name="Mozilla Firefox 1.5"  
+
=== Firefox ESR 68.8.0 x86 and x64 version (WPKG 1.3.1) ===
    revision="15041"  
+
 
    reboot="false"  
+
This package is for the Extended Support Release (ESR) x86 and x64 versions of Firefox provided with a .ini for installation and client configuration.
    priority="10">
+
 
 +
Put the x86 and x64 install in two sub folder named x86 and x64 in %SOFTWARE%/Mozilla/Firefox.
 +
 
 +
<source lang="xml">
 +
<package  
 +
id="firefox"
 +
name="Mozilla Firefox"
 +
revision="%PKG_VERSION%"
 +
reboot="false"
 +
priority="0">
 
   
 
   
    <check type="uninstall" condition="exists" path="Mozilla Firefox (1.5)" />
+
<variable name="PKG_VERSION" value="68.8.0" />
 +
<variable name="PKG_LOCALE" value="ru" />
 +
<variable name="PKG_ARCHITECTURE" value="x86" architecture="x86" />
 +
<variable name="PKG_ARCHITECTURE" value="x64" architecture="x64" />
 +
<variable name="PKG_SOURCE" value="%SOFTWARE%\Mozilla\Firefox" />
 +
<variable name="PKG_NAME" value="Firefox Setup %PKG_VERSION%esr.exe" />
 +
<variable name="PKG_INSTALL_SWITCH" value="-ms /INI=%PKG_SOURCE%\config.ini" />
 +
<variable name="PKG_REMOVE_SWITCH" value="-ms" />
 +
<variable name="PKG_DESTINATION" value="%ProgramFiles%\Mozilla Firefox" />
 +
<variable name="PKG_CONFIG1" value="%PKG_SOURCE%\settings\mozilla.cfg" />
 +
<variable name="PKG_CONFIG2" value="%PKG_SOURCE%\settings\policies.js" />
 
   
 
   
    <install cmd='"%SOFTWARE%\firefox\Firefox Setup 1.5.0.4.exe" -ms' />
+
<check type="uninstall" condition="exists" path="Mozilla Firefox %PKG_VERSION% ESR (%PKG_ARCHITECTURE% %PKG_LOCALE%)" />
+
    <upgrade cmd='"%SOFTWARE%\firefox\Firefox Setup 1.5.0.4.exe" -ms' />
+
<install cmd="taskkill /F /IM Firefox.exe">
 +
<exit code="0" />
 +
<exit code="1" />
 +
<exit code="128" />
 +
</install>
 +
 
 +
<install cmd='"%PKG_SOURCE%\%PKG_ARCHITECTURE%\%PKG_NAME%" %PKG_INSTALL_SWITCH%' />
 +
<install cmd='%COMSPEC% /C copy /Y /V "%PKG_CONFIG1%" "%PKG_DESTINATION%\"' />
 +
<install cmd='%COMSPEC% /C copy /Y /V "%PKG_CONFIG2%" "%PKG_DESTINATION%\defaults\pref\"' />
 +
 
 +
<upgrade cmd="taskkill /F /IM Firefox.exe">
 +
<exit code="0" />
 +
<exit code="128" />
 +
<exit code="1" />
 +
</upgrade>
 
   
 
   
    <remove cmd='"%PROGRAMFILES%\Mozilla Firefox\uninstall\uninstall.exe" -ms' />
+
<upgrade cmd='"%PKG_SOURCE%\%PKG_ARCHITECTURE%\%PKG_NAME%" -ms' />
 +
<upgrade cmd='%COMSPEC% /C copy /Y /V "%PKG_CONFIG1%" "%PKG_DESTINATION%\"' />
 +
<upgrade cmd='%COMSPEC% /C copy /Y /V "%PKG_CONFIG2%" "%PKG_DESTINATION%\defaults\pref\"' />
 +
 +
<remove cmd="taskkill /F /IM Firefox.exe">
 +
<exit code="0" />
 +
<exit code="128" />
 +
<exit code="1" />
 +
</remove>
 
   
 
   
</package>
+
<remove cmd='%COMSPEC% /C if exist "%PKG_DESTINATION%\uninstall\helper.exe" "%PKG_DESTINATION%\uninstall\helper.exe" %PKG_REMOVE_SWITCH%' />
 +
 +
</package>
 +
</source>
  
 +
=== Firefox 19 - 58 (For current versions of WPKG) ===
  
For Firefox 2.0 uninstall flags changed:
+
This package is for versions of Firefox 19 and higher but works the same for versions of Firefox 19 to 58.
  
<package  
+
This package works with 32-bit and 64-bit architectures but requires you alter the 'architecture' value for 64-bit systems.
    id="firefox"  
+
 
    name="Mozilla Firefox 2.0"  
+
<source lang="xml">
    revision="2000"  
+
<package  
    reboot="false"  
+
id="firefox"
    priority="10">
+
name="Mozilla Firefox"
 +
revision="%version%"
 +
reboot="false"
 +
priority="10">
 
   
 
   
    <check type="uninstall" condition="exists" path="Mozilla Firefox (2.0)" />
+
<variable name="version" value="58.0.2" />
 +
<variable name="architecture" value="x86" />
 +
<variable name="locale" value="en-GB" />
 +
<!--  <variable name="locale" value="fr" /> -->
 +
 
 +
<check type="uninstall" condition="exists" path="Mozilla Firefox %version% (%architecture% %locale%)" />
 +
 +
<install cmd="taskkill /F /IM Firefox.exe">
 +
<exit code="0" />
 +
<exit code="-1073741515" />
 +
<exit code="128" />
 +
</install>
 +
 +
<install cmd='"%SOFTWARE%\firefox\Firefox Setup %version%.exe" -ms' />
 
   
 
   
    <install cmd='"%SOFTWARE%\firefox\Firefox Setup 2.0.exe" -ms' />
+
<upgrade include="install" />
 
   
 
   
    <upgrade cmd='"%SOFTWARE%\firefox\Firefox Setup 2.0.exe" -ms' />
+
<remove cmd="taskkill /F /IM Firefox.exe">
 +
<exit code="0" />
 +
<exit code="128" />
 +
<exit code="-1073741515" />
 +
</remove>
 
   
 
   
    <remove cmd='"%PROGRAMFILES%\Mozilla Firefox\uninstall\uninst.exe" /s' />
+
<!-- for 32bit and 64bit System -->
 +
<remove cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Mozilla Firefox\uninstall\helper.exe" "%PROGRAMFILES%\Mozilla Firefox\uninstall\helper.exe" -ms' />
 +
<remove cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%\Mozilla Firefox\uninstall\helper.exe" "%PROGRAMFILES(x86)%\Mozilla Firefox\uninstall\helper.exe" -ms' />
 
   
 
   
</package>
+
</package>
 +
</source>
  
== Make Firefox the default browser ==
+
== Extensions ==
  
This one will set Firefox as the default browser for all users - it will try to start Firefox in the background, which will set itself as the default browser. After 10 seconds, we kill the Firefox process, as it's no longer needed, and repeat the process again to make sure we really did set the default browser to Firefox (it's needed to do it like this in some circumstances). Note the "taskkill" command exists in Windows XP (and probably Windows Server 2003) but not Windows 2000.
+
==== Initial extension automatic checking and disabling ====
  
<package
+
When upgrading to a new version, Firefox does an initial check for extensions compatibility and shows a dialog box disabiling all them automatically.
 +
 
 +
To prevent this, configure '''mozilla.cfg''':
 +
 
 +
<source lang="ini">
 +
pref("extensions.shownSelectionUI", true);
 +
pref("extensions.autoDisableScopes", 0);
 +
</source>
 +
 
 +
In this way, no extension is disabled.
 +
 
 +
==== Firefox 4 Series Extensions ====
 +
 
 +
Firefox 4 handles extensions the same as 3.6 with two differences. First, not all extensions need to be extracted first. This depends on the extension, so you'll have to test each one to find out or just extract them all anyways. Second, globally installed extensions (under Program Files rather than the user profile) need a registry key added.
 +
 
 +
<source lang="xml">
 +
<package
 +
  id="firefox-adblock"
 +
  name="Adblock+"
 +
  revision="%version%"
 +
  priority="10">
 +
 
 +
  <variable name="version" value="1.3.7" />
 +
  <variable name="extid" value="{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" />
 +
 
 +
  <check
 +
    type="file"
 +
    condition="exists"
 +
    path="%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%\chrome.manifest" />
 +
 
 +
  <install cmd='%COMSPEC% /C xcopy /E /Y "%SOFTWARE%\apps\firefox\adblock\%version%" "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%\"' />
 +
  <install cmd='%COMSPEC% /C reg add "HKLM\Software\Mozilla\Firefox\Extensions" /v %extid% /d "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%" /f' />
 +
 +
  <upgrade cmd="taskkill /F /IM Firefox.exe">
 +
    <exit code="0" />
 +
    <exit code="128" />
 +
  </upgrade>
 +
  <upgrade cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%" rmdir /q /s "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%"' />
 +
  <upgrade cmd='%COMSPEC% /C xcopy /E /Y "%SOFTWARE%\apps\firefox\adblock\%version%" "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%\"' />
 +
  <upgrade cmd='%COMSPEC% /C reg add "HKLM\Software\Mozilla\Firefox\Extensions" /v %extid% /d "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%" /f' />
 +
 +
  <remove cmd="taskkill /F /IM Firefox.exe">
 +
    <exit code="0" />
 +
    <exit code="128" />
 +
  </remove>
 +
  <remove cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%" rmdir /q /s "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%"' />
 +
  <remove cmd='%COMSPEC% /C reg delete "HKLM\Software\Mozilla\Firefox\Extensions" /v %extid% /f' />
 +
</package>
 +
</source>
 +
 
 +
 
 +
== Customization ==
 +
 
 +
=== Make Firefox the Default Browser ===
 +
 
 +
==== Option 1 ====
 +
 
 +
Use the uninstall helper to set Firefox as the default browser. Add these lines to your package definition after the lines that install or upgrade Firefox.
 +
 
 +
<source lang="xml">
 +
 
 +
        <install architecture="x86" cmd='%ComSpec% /c "%PROGRAMFILES%\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppGlobal' >
 +
<exit code="2" />
 +
</install>
 +
<install architecture="x64" cmd='%ComSpec% /c "%PROGRAMFILES(x86)%\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppGlobal' >
 +
<exit code="2" />
 +
</install>
 +
 
 +
        <upgrade include="install" />
 +
</source>
 +
 
 +
==== Option 2 ====
 +
 
 +
This one will set Firefox as the default browser for all users - it will try to start Firefox in the background, which will set itself as the default browser. After 10 seconds, we kill the Firefox process, as it's no longer needed, and repeat the process again to make sure we really did set the default browser to Firefox (it's needed to do it like this in some circumstances). Note the "taskkill" command exists in Windows XP Pro (and probably Windows Server 2003) but not Windows 2000 or XP Home.
 +
 
 +
<source lang="xml">
 +
<package
 
     id="firefox-default"
 
     id="firefox-default"
 
     name="Make Firefox the default browser"
 
     name="Make Firefox the default browser"
Line 62: Line 207:
 
   <exit code="0" />
 
   <exit code="0" />
 
   </install>
 
   </install>
<install cmd='ping 127.0.0.1 -n 10>NUL' />
+
  <install cmd='ping 127.0.0.1 -n 10>NUL' />
<install cmd='taskkill /F /IM Firefox.exe' >
+
  <install cmd='taskkill /F /IM Firefox.exe' >
 
   <exit code="0" />
 
   <exit code="0" />
 
   <exit code="128" />
 
   <exit code="128" />
</install>
 
  <install timeout="10" cmd='"%PROGRAMFILES%\Mozilla Firefox\firefox.exe" -silent -nosplash -setDefaultBrowser' >
 
  <exit code="-1" />
 
  <exit code="0" />
 
 
   </install>
 
   </install>
<install cmd='ping 127.0.0.1 -n 10>NUL' />
 
<install cmd='taskkill /F /IM Firefox.exe' >
 
  <exit code="0" />
 
  <exit code="128" />
 
</install>
 
 
   
 
   
</package>
+
</package>
 +
</source>
 +
 
 +
See also
 +
[http://kb.mozillazine.org/Default_browser#Windows Mozillazine on Default Browser].
 +
 
 +
=== Setting and Locking Preferences ===
 +
 
 +
Firefox supports the ability to both set and lock user preferences. This feature is useful for forcing all users to use a specific proxy server, setting or forcing a homepage, disabling automatic updates, and so on.
 +
 
 +
Create a file called policies.js with the following contents:
 +
<source lang="javascript">
 +
pref("general.config.obscure_value", 0);
 +
pref("general.config.filename", "mozilla.cfg");
 +
</source>
 +
 
 +
You may choose to use obscured values in mozilla.cfg by changing the obscure_value above to 13 (for byteshift 13), but beware you will need to go through an additional step to convert the plain-text config to an obscured version every time you make a change. Also note that the method used to obscure the config file is easily reversible.  For example:
 +
<source lang="javascript">
 +
pref("general.config.obscure_value", 13);
 +
pref("general.config.filename", "mozilla.cfg");
 +
</source>
 +
 
 +
Next, create your mozilla.cfg file. Open Firefox and enter about:config in the address bar to see all of the available configuration options. Note that the first line must be a comment, any options configured in the first line will be ignored.
 +
 
 +
If using an obscured config, this should be saved as mozilla.txt instead and converted to an obscured mozilla.cfg. Normaly you can do a online conversion at: http://alain.knaff.linux.lu/howto/MozillaCustomization/cgi/byteshf.cgi
 +
Unfortunately this web site is out of order for now.
 +
 
 +
If any issues you may alternatively run moz-byteshift.pl available here - https://developer.mozilla.org/en/Automatic_Mozilla_Configurator/Locked_config_settings
 +
The perl interpreter is required - http://www.activestate.com/activeperl
 +
 
 +
<source lang="javascript">
 +
//
 +
 
 +
// Don't show the Firefox has been upgraded page
 +
lockPref("browser.startup.homepage_override.mstone", "ignore");
 +
 
 +
// Don't check for the default browser
 +
lockPref("browser.shell.checkDefaultBrowser", false);
 +
 
 +
// Disable automatic updates
 +
lockPref("app.update.enabled", false);
 +
 
 +
// Set the homepage
 +
lockPref("browser.startup.homepage", "http://www.example.com");
 +
lockPref("browser.startup.page", 1);
 +
 
 +
// Proxy configuration
 +
lockPref("network.proxy.backup.ftp", "your.proxy");
 +
lockPref("network.proxy.backup.ftp_port", 3128);
 +
lockPref("network.proxy.backup.gopher", "your.proxy");
 +
lockPref("network.proxy.backup.gopher_port", 3128);
 +
lockPref("network.proxy.backup.socks", "your.proxy");
 +
lockPref("network.proxy.backup.socks_port", 3128);
 +
lockPref("network.proxy.backup.ssl", "your.proxy");
 +
lockPref("network.proxy.backup.ssl_port", 3128);
 +
lockPref("network.proxy.ftp", "your.proxy");
 +
lockPref("network.proxy.ftp_port", 3128);
 +
lockPref("network.proxy.gopher", "your.proxy");
 +
lockPref("network.proxy.gopher_port", 3128);
 +
lockPref("network.proxy.http", "your.proxy");
 +
lockPref("network.proxy.http_port", 3128);
 +
 
 +
lockPref("network.proxy.no_proxies_on", "192.168.*,localhost,127.0.0.1, glpi, glpi.your.domain");
 +
 
 +
lockPref("network.proxy.share_proxy_settings", true);
 +
lockPref("network.proxy.socks", "your.proxy");
 +
lockPref("network.proxy.socks_port", 3128);
 +
lockPref("network.proxy.ssl", "your.proxy");
 +
lockPref("network.proxy.ssl_port", 3128);
 +
lockPref("network.proxy.type", 1);
 +
</source>
 +
 
 +
You can find more details on locking preferences here: http://kb.mozillazine.org/Locking_preferences
 +
 
 +
Note that you can use pref() instead of lockPref() if you only want to set the default and allow users to change the setting later.
 +
 
 +
policies.js should be located in %PROGRAMFILES%\Mozilla Firefox\defaults\pref\ and mozilla.cfg should be located in %PROGRAMFILES%\Mozilla Firefox\.
 +
 
 +
For Firefox 10 (maybe previous version, not tested), to  stop the prompt to 'send my usage stats and data to some server somewhere in the world', add to mozilla.cfg
 +
 
 +
<source lang="javascript">
 +
lockPref("toolkit.telemetry.enabled", false);
 +
lockPref("toolkit.telemetry.rejected", true);
 +
lockPref("toolkit.telemetry.prompted", 2);
 +
</source>
 +
 
 +
To set the startup web page for all new and current users when they press the button 'Restore to Default':
 +
 
 +
- In notepad, create a new file with the contents:
 +
 
 +
<source lang="xml">
 +
browser.startup.homepage=http://www.maths.cam.ac.uk
 +
</source>
 +
 
 +
(change the URL to something more personal)
 +
 
 +
Save the file as browserconfig.properties
 +
 
 +
- Add this file to the archive file C:\program files (x86)\Mozilla Firefox\omni.ja by using 7-zip
 +
 
 +
<source lang="xml">
 +
7z.exe a "C:\program files (x86)\Mozilla Firefox\omni.ja" [path to browserconfig.properties]
 +
</source>
 +
 
 +
 
 +
==== To turn on the bookmark toolbar and display the menu bar, either ====
 +
 
 +
1. Copy the following into a file called C:\program files (x86)\Mozilla Firefox\defaults\profile\localstore.rdf (the dir \profile may not exist, if it doesn't, create it).
 +
 
 +
<source lang="xml">
 +
<?xml version="1.0"?>
 +
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
 +
        xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 +
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#PersonalToolbar"
 +
                  collapsed="false"
 +
                  currentset="personal-bookmarks" />
 +
  <RDF:Description RDF:about="chrome://browser/content/browser.xul">
 +
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#main-window"/>
 +
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#PersonalToolbar"/>
 +
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#navigator-toolbox"/>
 +
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#toolbar-menubar"/>
 +
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#nav-bar"/>
 +
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#TabsToolbar"/>
 +
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#addon-bar"/>
 +
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-box"/>
 +
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-title"/>
 +
  </RDF:Description>
 +
  <RDF:Description RDF:about="chrome://global/content/customizeToolbar.xul#CustomizeToolbarWindow"
 +
                  width="533"
 +
                  height="470" />
 +
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#TabsToolbar"
 +
                  currentset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton" />
 +
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-title"
 +
                  value="" />
 +
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#addon-bar"
 +
                  currentset="addonbar-closebutton,spring,status-bar" />
 +
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#nav-bar"
 +
                  currentset="unified-back-forward-button,reload-button,stop-button,home-button,urlbar-container,search-container,bookmarks-menu-button-container,fullscreenflex,window-controls" />
 +
  <RDF:Description RDF:about="chrome://browser/content/preferences/preferences.xul#BrowserPreferences"
 +
                  lastSelected="paneMain" />
 +
  <RDF:Description RDF:about="chrome://browser/content/preferences/preferences.xul">
 +
    <NC:persist RDF:resource="chrome://browser/content/preferences/preferences.xul#BrowserPreferences"/>
 +
  </RDF:Description>
 +
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#navigator-toolbox"
 +
                  tabsontop="false" />
 +
  <RDF:Description RDF:about="chrome://global/content/customizeToolbar.xul">
 +
    <NC:persist RDF:resource="chrome://global/content/customizeToolbar.xul#CustomizeToolbarWindow"/>
 +
  </RDF:Description>
 +
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-box"
 +
                  sidebarcommand=""
 +
                  width=""
 +
                  src="" />
 +
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#toolbar-menubar"
 +
                  autohide="false"
 +
                  currentset="menubar-items" />
 +
</RDF:RDF>
 +
</source>
 +
 
 +
OR
 +
 
 +
2.  To manually create localstore.rdf, create a new firefox profile, customise the toolbars and quit firefox.  Copy the file localstore.rdf is the profile just created to C:\program files (x86)\Mozilla Firefox\defaults\profile\localstore.rdf (the dir \profile may not exist, if it doesn't, create it).
 +
 
  
== Firefox with extensions and default profile ==
+
==== Adding the settings to your package definition ====
 +
Add the following to your package definition in the appropriate places:
  
You need the following structure:
+
<source lang="xml">
%SOFTWARE%\mozilla\firefox-1507-(language).exe
+
  <check type="file" condition="exists" architecture="x86" path="%PROGRAMFILES%\Mozilla Firefox\defaults\pref\policies.js" />
%SOFTWARE%\mozilla\fx_extensions          (all extensions you need)
+
  <check type="file" condition="exists" architecture="x64" path="%PROGRAMFILES(x86)%\Mozilla Firefox\defaults\pref\policies.js" />
%SOFTWARE%\mozilla\fx_profile            (copy in whatever you need in Firefox' dir)
+
  <check type="file" condition="exists" architecture="x86" path="%PROGRAMFILES%\Mozilla Firefox\mozilla.cfg" />
%SOFTWARE%\tools\pskill.exe              (from sysinternals)
+
  <check type="file" condition="exists" architecture="x64" path="%PROGRAMFILES(x86)%\Mozilla Firefox\mozilla.cfg" />
  
We assign two profiles - one for normal users, one for webdevelopers,
+
  <install architecture="x86" cmd='%COMSPEC% /c copy /y "%SOFTWARE%\firefox\policies.js" "%PROGRAMFILES%\Mozilla Firefox\defaults\pref\"' />
with <depends profile-id "..."> in profiles.xml:
+
  <install architecture="x64" cmd='%COMSPEC% /c copy /y "%SOFTWARE%\firefox\policies.js" "%PROGRAMFILES(x86)%\Mozilla Firefox\defaults\pref\"' />
 +
 +
  <install architecture="x86" cmd='%COMSPEC% /c copy /y "%SOFTWARE%\firefox\mozilla.cfg" "%PROGRAMFILES%\Mozilla Firefox\"' />
 +
  <install architecture="x64" cmd='%COMSPEC% /c copy /y "%SOFTWARE%\firefox\mozilla.cfg" "%PROGRAMFILES(x86)%\Mozilla Firefox\"' />
 +
</source>
  
    <profile id="firefox">
+
=== Disable Automatic Updates ===
        <package package-id="firefox15" />
+
        <package package-id="firefox-ext-adblockplus" />
+
        <package package-id="firefox-ext-bookmarkdupdetect" />
+
        <package package-id="firefox-ext-conquery" />
+
        <package package-id="firefox-ext-cookieculler" />
+
        <package package-id="firefox-ext-downthemall" />
+
        <package package-id="firefox-ext-idninfo" />
+
        <package package-id="firefox-ext-ieview" />
+
        <package package-id="firefox-ext-longurl" />
+
        <package package-id="firefox-ext-pdfdownload" />
+
        <package package-id="firefox-ext-plaintextlinks" />
+
        <package package-id="firefox-ext-printit" />
+
        <package package-id="firefox-ext-searchpluginhacks" />
+
        <package package-id="firefox-ext-showip" />
+
        <package package-id="firefox-ext-sortbookmarks" />
+
        <package package-id="firefox-ext-tabprefs" />
+
        <package package-id="firefox-ext-undoclosetab" />
+
        <package package-id="firefox-ext-winupdate" />
+
    </profile>
+
  
    <profile id="firefox-dev">
+
If Firefox is started by a user without administrative powers, automatic Firefox update will fail - which is harmless, but can confuse some users. To disable Firefox automatic updates, read the section on setting and locking preferences above first, and then add this line to your mozilla.cfg file:
        <package package-id="firefox15" />
+
        <package package-id="firefox-ext-adblockplus" />
+
        <package package-id="firefox-ext-aardvark" />
+
        <package package-id="firefox-ext-bookmarkdupdetect" />
+
        <package package-id="firefox-ext-conquery" />
+
        <package package-id="firefox-ext-cookieculler" />
+
        <package package-id="firefox-ext-cssviewer" />
+
        <package package-id="firefox-ext-downthemall" />
+
        <package package-id="firefox-ext-idninfo" />
+
        <package package-id="firefox-ext-ieview" />
+
        <package package-id="firefox-ext-longurl" />
+
        <package package-id="firefox-ext-pdfdownload" />
+
        <package package-id="firefox-ext-plaintextlinks" />
+
        <package package-id="firefox-ext-printit" />
+
        <package package-id="firefox-ext-searchpluginhacks" />
+
        <package package-id="firefox-ext-showip" />
+
        <package package-id="firefox-ext-sortbookmarks" />
+
        <package package-id="firefox-ext-tabprefs" />
+
        <package package-id="firefox-ext-undoclosetab" />
+
        <package package-id="firefox-ext-winupdate" />
+
        <package package-id="firefox-ext-webdeveloper" />
+
        <package package-id="firefox-ext-xray" />
+
    </profile>
+
  
Don't forget to adjust the language version of firefox and its extensions,
+
<source lang="javascript">
the profile etc. The check conditions for the extensions could be wrong
+
lockPref("app.update.enabled", false);
for other languages, too. The pskill is sometimes needed: if firefox is
+
</source>
started the first time as default user - it asks for importing the ie bookmarks
+
and never comes back ... If there is an older version of Firefox < 1.5 during
+
first install, the program dir is just renamed (too much different ways of
+
uninstall).
+
  
        <package
+
=== Disable Profile Migrator ===
          id="firefox15"
+
          name="Mozilla Firefox 1.5"
+
          revision="1507"
+
          reboot="false"
+
          priority="99">
+
          <check type="uninstall" condition="exists" path="Mozilla Firefox (1.5)" />
+
          <check type="file" condition="exists" path="%programfiles%\mozilla firefox\defaults\profile\prefs.js" />
+
          <install cmd='cmd /c if exist "%programfiles%\mozilla firefox\firefox.exe" move /y "%programfiles%\mozilla firefox" "%programfiles%\mozilla firefox.bak"' >
+
            <exit code="1" />
+
          </install>
+
          <install cmd='"%SOFTWARE%\mozilla\firefox-1507-deu.exe" -ms'>
+
            <exit code="0" />
+
          </install>
+
          <install cmd='cmd /c if exist "%programfiles%\mozilla firefox.bak\searchplugins" copy /y "%programfiles%\mozilla firefox.bak\searchplugins\*" "%programfiles%\mozilla firefox\searchplugins\"' >
+
            <exit code="1" />
+
            <exit code="0" />
+
          </install>
+
          <install cmd='xcopy /v /s /i /e /h /c /y /q "%SOFTWARE%\mozilla\fx_profile\*" "%programfiles%\mozilla firefox\"' >
+
            <exit code="1" />
+
          </install>
+
          <install cmd='"%PROGRAMFILES%\Mozilla Firefox\firefox.exe" -CreateProfile default '>
+
            <exit code="0" />
+
          </install>
+
          <upgrade cmd='"%SOFTWARE%\mozilla\firefox-1507-deu.exe" -ms'>
+
            <exit code="0" />
+
          </upgrade>
+
          <upgrade cmd='xcopy /v /s /i /e /h /c /y /q "%SOFTWARE%\mozilla\fx_profile\*" "%programfiles%\mozilla firefox\"' >
+
            <exit code="1" />
+
          </upgrade>
+
          <remove cmd='"%programfiles%\mozilla firefox\uninstall\uninstall.exe" -ms' >
+
            <exit code="20" />
+
          </remove>
+
        </package>
+
    <package
+
        id="firefox-ext-adblockplus"
+
        name="firefox extension adblock"
+
        revision="8"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\chrome\adblockplus.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\AdblockPlus_0.7.1.2_fx+sm+fl_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <upgrade cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\AdblockPlus_0.7.1.2_fx+sm+fl_de-DE.xpi'>
+
            <exit code="0" />
+
        </upgrade>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-aardvark"
+
        name="firefox extension aardvark"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{dd6976bb-536b-45cf-b2b6-5c137ec19a76}\chrome\aardvark.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\aardvark.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{dd6976bb-536b-45cf-b2b6-5c137ec19a76}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-bookmarkdupdetect"
+
        name="firefox extension bookmarkdupdetection"
+
        revision="3"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{ba243cb0-b824-4a26-9418-73ee795d9b9d}\chrome\duplicates.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\BookmarkDuplicateDetector_0.5.0_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <upgrade cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\BookmarkDuplicateDetector_0.5.0_de-DE.xpi'>
+
            <exit code="0" />
+
        </upgrade>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{ba243cb0-b824-4a26-9418-73ee795d9b9d}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-conquery"
+
        name="firefox extension conquery"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{34fba747-cbc2-4929-b00d-0e523ee94a6f}\chrome\conquery.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\ConQuery_1.6.4_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{34fba747-cbc2-4929-b00d-0e523ee94a6f}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-cookieculler"
+
        name="firefox extension cookieculler"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{99B98C2C-7274-45a3-A640-D9DF1A1C8460}\chrome\cookieculler.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\CookieCuller_1.3.0_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{99B98C2C-7274-45a3-A640-D9DF1A1C8460}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-cssviewer"
+
        name="firefox extension cssviewer"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{8be51513-0433-45c1-9203-7b45019df871}\chrome\cssviewer.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\cssviewer-1.0.1-fx.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{8be51513-0433-45c1-9203-7b45019df871}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-downthemall"
+
        name="firefox extension downthemall"
+
        revision="5"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{DDC359D1-844A-42a7-9AA1-88A850A938A8}\chrome\dta.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\downthemall_-0.9.9.6.5-fx+fl+tb.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <upgrade cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\downthemall_-0.9.9.6.5-fx+fl+tb.xpi'>
+
            <exit code="0" />
+
        </upgrade>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{DDC359D1-844A-42a7-9AA1-88A850A938A8}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-gcache"
+
        name="firefox extension gcache"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{5A32C460-12D9-11D9-9669-0800200C9A66}\chrome\gcache.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\Gcache_0.2.4_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{5A32C460-12D9-11D9-9669-0800200C9A66}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-idninfo"
+
        name="firefox extension idninfo"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{44429A1C-82C0-41ea-93DC-52A0B467AD7B}\chrome\idninfo.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\IDNinfo_0.6.5_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{44429A1C-82C0-41ea-93DC-52A0B467AD7B}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-pdfdownload"
+
        name="firefox extension pdfdownload"
+
        revision="4"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{37E4D8EA-8BDA-4831-8EA1-89053939A250}\chrome\pdfdownload.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\PDFDownload_0.7.4_fx+fl_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <upgrade cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\PDFDownload_0.7.4_fx+fl_de-DE.xpi'>
+
            <exit code="0" />
+
        </upgrade>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{37E4D8EA-8BDA-4831-8EA1-89053939A250}\chrome\pdfdownload.jar"' />
+
    </package>
+
    <package
+
        id="firefox-ext-plaintextlinks"
+
        name="firefox extension plaintextlinks"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{ec268e28-22c6-4a6c-ac22-635cabee283c}\chrome\textlink.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\PlainTextLinks_0.2_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{ec268e28-22c6-4a6c-ac22-635cabee283c}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-printit"
+
        name="firefox extension printit"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{349ce370-12e8-11d9-9669-0800200c9a66}\chrome\printit.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\PrintIt_0.3.8_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{349ce370-12e8-11d9-9669-0800200c9a66}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-showip"
+
        name="firefox extension showip"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{3e9bb2a7-62ca-4efa-a4e6-f6f6168a652d}\chrome\ipv6ident.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\showip_0_8_03.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{3e9bb2a7-62ca-4efa-a4e6-f6f6168a652d}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-ieview"
+
        name="firefox extension ieview"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{6e84150a-d526-41f1-a480-a67d3fed910d}\chrome\ieview.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\IEView_1.2.7_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{6e84150a-d526-41f1-a480-a67d3fed910d}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-longurl"
+
        name="firefox extension longurl"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{10F04CC7-50E2-4564-99EC-6E9B27985908}\chrome\openlongurl.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\OpenLongUrl_0.2.2_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{10F04CC7-50E2-4564-99EC-6E9B27985908}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-searchpluginhacks"
+
        name="firefox extension searchpluginhacks"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{9A2DA8C0-A778-4438-A892-D5CCEFC7BB85}\chrome\searchpluginshacks.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\searchpluginhacks-0.1.3-fx.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{9A2DA8C0-A778-4438-A892-D5CCEFC7BB85}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-sortbookmarks"
+
        name="firefox extension sortbookmarks"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{ea702e71-fcda-4c39-93bb-fea2b543b58c}/chrome/sortbookmarks.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\SortBookmarks_0.7.0_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{ea702e71-fcda-4c39-93bb-fea2b543b58c}/chrome/sortbookmarks.jar"' />
+
    </package>
+
    <package
+
        id="firefox-ext-tabprefs"
+
        name="firefox extension tabprefs"
+
        revision="3"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{9b9d2aaa-ae26-4447-a7a1-633a32b19ddd}\chrome\tabprefs.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\TabbrowserPreferences_1.2.8.9_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <upgrade cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\TabbrowserPreferences_1.2.8.9_de-DE.xpi'>
+
            <exit code="0" />
+
        </upgrade>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{9b9d2aaa-ae26-4447-a7a1-633a32b19ddd}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-undoclosetab"
+
        name="firefox extension undoclosetab"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\undoclosetab@dorando\chrome\undoclosetab.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\UndoCloseTab_20051204_de-DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\undoclosetab@dorando"' />
+
    </package>
+
    <package
+
        id="firefox-ext-winupdate"
+
        name="firefox extension winupdate"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{35106bca-6c78-48c7-ac28-56df30b51d2b}\chrome\windowsupdate.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\WindowsUpdate_1.1.6_de.DE.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{35106bca-6c78-48c7-ac28-56df30b51d2b}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-webdeveloper"
+
        name="firefox extension webdeveloper"
+
        revision="3"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{c45c406e-ab73-11d8-be73-000a95be3b12}\chrome\webdeveloper.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\webdeveloper_localized.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{c45c406e-ab73-11d8-be73-000a95be3b12}"' />
+
    </package>
+
    <package
+
        id="firefox-ext-xray"
+
        name="firefox extension xray"
+
        revision="2"
+
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\{3f1182ea-3243-4d32-8826-71fb1cc9c328}\chrome\xray.jar" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\xray.xpi'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\{3f1182ea-3243-4d32-8826-71fb1cc9c328}"' />
+
    </package>
+
  
TEMPLATE package for fx_extensions (change XX)
+
To prevent users being asked if they want to migrate their settings from Internet Explorer during first run create a file called 'override.ini' and add the following lines:
  
    <package
+
<source lang="dos">
        id="firefox-ext-XX"
+
[XRE]
        name="firefox extension XX"
+
EnableProfileMigrator=false
        revision="1"
+
</source>
        reboot="false"
+
        priority="99">
+
        <depends package-id="firefox15" />
+
        <check type="file" condition="exists" path="%programfiles%\mozilla firefox\extensions\XX" />
+
        <install cmd='%SOFTWARE%\tools\pskill.exe firefox.exe'>
+
            <exit code="-1" />
+
        </install>
+
        <install cmd='%programfiles%\mozilla firefox\firefox.exe -install-global-extension %SOFTWARE%\mozilla\fx_extensions\XX'>
+
            <exit code="0" />
+
        </install>
+
        <remove  cmd='cmd /c del /q /s "%programfiles%\Mozilla Firefox\extensions\XX"' />
+
    </package>
+
  
== Firefox Client Customization Kit ==
+
Copy this file to %PROGRAMFILES%\Mozilla Firefox\browser\ or %PROGRAMFILES(x86)%\Mozilla Firefox\browser\ during installation.
  
The [http://www.mozilla.org/projects/cck/firefox/ Firefox Client Customization Kit] makes it easy for administrators to customize Firefox with home page settings, proxies, extensions, etc.  Also, you can lock preferences so that you users cannot change them.
+
=== Firefox Client Customization Kit ===
  
== Questions ==
+
The [https://addons.mozilla.org/en-US/firefox/addon/2553 Firefox Client Customization Kit] makes it easy for administrators to customize Firefox with home page settings, proxies, extensions, etc.  Also, you can lock preferences so that you users cannot change them. Version 1.2 has introduced support for Firefox 3.x, version 1.2.5 has dropped support for Firefox 2.x and only works for Firefox 3.x and later.
  
How do you do these things?
+
=== Use Windows Cert-Store ===
 +
Firefox has for every user a own certificat-store. With this Option enabled, firefox will also use the windows-certificat-store - which can be filled via [[SSL_CA_Install]]. This works with Firefox 49 and later:
  
* Make Firefox the default browser - already explained above, but here are some other interesting links:
+
<source lang="javascript">
 +
defaultPref("security.enterprise_roots.enabled", true);
 +
</source>
  
  * [http://sourceforge.net/mailarchive/forum.php?thread_id=10214034&forum_id=42940 Make Firefox default browser]
+
== External Links ==
  * [http://firefox.dbltree.com/ Automated deployment of Firefox with extensions, themes, and pre-configuration]
+
  
 +
* [http://kb.mozillazine.org/Editing_configuration '''mozillazine.org''': How to create a configuration file]
 +
* [http://kb.mozillazine.org/index.php?title=Category:Preferences '''mozillazine.org''': Preferences Reference for configuration files]
  
 
[[category:Silent Installers|Firefox]]
 
[[category:Silent Installers|Firefox]]
 +
[[category:Security Advisories]]

Latest revision as of 21:14, 10 May 2020

This page is for Mozilla Firefox, available from mozilla.com.

Installation

Link to latest Firefox installer at:

Command-line options for the installer are documented here, which also describes how to use a config.ini file for basic configuration of the Firefox install.

See Firefox#Customization for details on customizing the installation, installing extensions, and setting and locking preferences.

The section below called firefox#Adding_the_settings_to_your_package_definition contains the extra lines you'll need to supply Firefox with a specific configuration.

Firefox ESR 68.8.0 x86 and x64 version (WPKG 1.3.1)

This package is for the Extended Support Release (ESR) x86 and x64 versions of Firefox provided with a .ini for installation and client configuration.

Put the x86 and x64 install in two sub folder named x86 and x64 in %SOFTWARE%/Mozilla/Firefox.

<package 
	id="firefox"
	name="Mozilla Firefox"
	revision="%PKG_VERSION%"
	reboot="false"
	priority="0">
 
	<variable name="PKG_VERSION"		value="68.8.0" />
	<variable name="PKG_LOCALE"		value="ru" />
	<variable name="PKG_ARCHITECTURE"	value="x86" architecture="x86" />
	<variable name="PKG_ARCHITECTURE"	value="x64" architecture="x64" />
	<variable name="PKG_SOURCE"		value="%SOFTWARE%\Mozilla\Firefox" />
	<variable name="PKG_NAME"		value="Firefox Setup %PKG_VERSION%esr.exe" />
	<variable name="PKG_INSTALL_SWITCH"	value="-ms /INI=%PKG_SOURCE%\config.ini" />
	<variable name="PKG_REMOVE_SWITCH"	value="-ms" />
	<variable name="PKG_DESTINATION"	value="%ProgramFiles%\Mozilla Firefox" />
	<variable name="PKG_CONFIG1" 		value="%PKG_SOURCE%\settings\mozilla.cfg" />
	<variable name="PKG_CONFIG2" 		value="%PKG_SOURCE%\settings\policies.js" />
 
	<check type="uninstall" condition="exists" path="Mozilla Firefox %PKG_VERSION% ESR (%PKG_ARCHITECTURE% %PKG_LOCALE%)" />
	
	<install cmd="taskkill /F /IM Firefox.exe">
		<exit code="0" />
		<exit code="1" />
		<exit code="128" />
	</install>

	<install cmd='"%PKG_SOURCE%\%PKG_ARCHITECTURE%\%PKG_NAME%" %PKG_INSTALL_SWITCH%' />
	<install cmd='%COMSPEC% /C copy /Y /V "%PKG_CONFIG1%" "%PKG_DESTINATION%\"' /> 
	<install cmd='%COMSPEC% /C copy /Y /V "%PKG_CONFIG2%" "%PKG_DESTINATION%\defaults\pref\"' />

	<upgrade cmd="taskkill /F /IM Firefox.exe">
		<exit code="0" />
		<exit code="128" />
		<exit code="1" />
	</upgrade>
 
	<upgrade cmd='"%PKG_SOURCE%\%PKG_ARCHITECTURE%\%PKG_NAME%" -ms' />
	<upgrade cmd='%COMSPEC% /C copy /Y /V "%PKG_CONFIG1%" "%PKG_DESTINATION%\"' />
	<upgrade cmd='%COMSPEC% /C copy /Y /V "%PKG_CONFIG2%" "%PKG_DESTINATION%\defaults\pref\"' />
	
 	<remove cmd="taskkill /F /IM Firefox.exe">
		<exit code="0" />
		<exit code="128" />
		<exit code="1" />
	</remove>
 
	<remove cmd='%COMSPEC% /C if exist "%PKG_DESTINATION%\uninstall\helper.exe" "%PKG_DESTINATION%\uninstall\helper.exe" %PKG_REMOVE_SWITCH%' />
	 
</package>

Firefox 19 - 58 (For current versions of WPKG)

This package is for versions of Firefox 19 and higher but works the same for versions of Firefox 19 to 58.

This package works with 32-bit and 64-bit architectures but requires you alter the 'architecture' value for 64-bit systems.

<package 
	id="firefox"
	name="Mozilla Firefox"
	revision="%version%"
	reboot="false"
	priority="10">
 
	<variable name="version" value="58.0.2" />
	<variable name="architecture" value="x86" />
	<variable name="locale" value="en-GB" />
	<!--  <variable name="locale" value="fr" /> -->

	<check type="uninstall" condition="exists" path="Mozilla Firefox %version% (%architecture% %locale%)" />
 
	<install cmd="taskkill /F /IM Firefox.exe">
		<exit code="0" />
		<exit code="-1073741515" />
		<exit code="128" />
	</install>
 
	<install cmd='"%SOFTWARE%\firefox\Firefox Setup %version%.exe" -ms' />
 
	<upgrade include="install" />
 
	<remove cmd="taskkill /F /IM Firefox.exe">
		<exit code="0" />
		<exit code="128" />
		<exit code="-1073741515" />
	</remove>
 
	<!-- for 32bit and 64bit System -->
	<remove cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Mozilla Firefox\uninstall\helper.exe" "%PROGRAMFILES%\Mozilla Firefox\uninstall\helper.exe" -ms' />
	<remove cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%\Mozilla Firefox\uninstall\helper.exe" "%PROGRAMFILES(x86)%\Mozilla Firefox\uninstall\helper.exe" -ms' />
 
</package>

Extensions

Initial extension automatic checking and disabling

When upgrading to a new version, Firefox does an initial check for extensions compatibility and shows a dialog box disabiling all them automatically.

To prevent this, configure mozilla.cfg:

pref("extensions.shownSelectionUI", true);
pref("extensions.autoDisableScopes", 0);

In this way, no extension is disabled.

Firefox 4 Series Extensions

Firefox 4 handles extensions the same as 3.6 with two differences. First, not all extensions need to be extracted first. This depends on the extension, so you'll have to test each one to find out or just extract them all anyways. Second, globally installed extensions (under Program Files rather than the user profile) need a registry key added.

<package
  id="firefox-adblock"
  name="Adblock+"
  revision="%version%"
  priority="10">

  <variable name="version" value="1.3.7" />
  <variable name="extid" value="{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" />

  <check
    type="file"
    condition="exists"
    path="%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%\chrome.manifest" />

  <install cmd='%COMSPEC% /C xcopy /E /Y "%SOFTWARE%\apps\firefox\adblock\%version%" "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%\"' />
  <install cmd='%COMSPEC% /C reg add "HKLM\Software\Mozilla\Firefox\Extensions" /v %extid% /d "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%" /f' />
	
  <upgrade cmd="taskkill /F /IM Firefox.exe">
    <exit code="0" />
    <exit code="128" />
  </upgrade>
  <upgrade cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%" rmdir /q /s "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%"' />
  <upgrade cmd='%COMSPEC% /C xcopy /E /Y "%SOFTWARE%\apps\firefox\adblock\%version%" "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%\"' />
  <upgrade cmd='%COMSPEC% /C reg add "HKLM\Software\Mozilla\Firefox\Extensions" /v %extid% /d "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%" /f' />
		
  <remove cmd="taskkill /F /IM Firefox.exe">
    <exit code="0" />
    <exit code="128" />
  </remove>
  <remove cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%" rmdir /q /s "%PROGRAMFILES%\Mozilla Firefox\extensions\%extid%"' />
  <remove cmd='%COMSPEC% /C reg delete "HKLM\Software\Mozilla\Firefox\Extensions" /v %extid% /f' />
</package>


Customization

Make Firefox the Default Browser

Option 1

Use the uninstall helper to set Firefox as the default browser. Add these lines to your package definition after the lines that install or upgrade Firefox.

        <install architecture="x86" cmd='%ComSpec% /c "%PROGRAMFILES%\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppGlobal' >
		<exit code="2" />
	</install>
	<install architecture="x64" cmd='%ComSpec% /c "%PROGRAMFILES(x86)%\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppGlobal' >
		<exit code="2" />
	</install>

        <upgrade include="install" />

Option 2

This one will set Firefox as the default browser for all users - it will try to start Firefox in the background, which will set itself as the default browser. After 10 seconds, we kill the Firefox process, as it's no longer needed, and repeat the process again to make sure we really did set the default browser to Firefox (it's needed to do it like this in some circumstances). Note the "taskkill" command exists in Windows XP Pro (and probably Windows Server 2003) but not Windows 2000 or XP Home.

<package
     id="firefox-default"
     name="Make Firefox the default browser"
     revision="1"
     priority="0"
     execute="once">
 
  <install timeout="10" cmd='"%PROGRAMFILES%\Mozilla Firefox\firefox.exe" -silent -nosplash -setDefaultBrowser' >
   <exit code="-1" />
   <exit code="0" />
  </install>
  <install cmd='ping 127.0.0.1 -n 10>NUL' />
  <install cmd='taskkill /F /IM Firefox.exe' >
   <exit code="0" />
   <exit code="128" />
  </install>
 
</package>

See also Mozillazine on Default Browser.

Setting and Locking Preferences

Firefox supports the ability to both set and lock user preferences. This feature is useful for forcing all users to use a specific proxy server, setting or forcing a homepage, disabling automatic updates, and so on.

Create a file called policies.js with the following contents:

pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");

You may choose to use obscured values in mozilla.cfg by changing the obscure_value above to 13 (for byteshift 13), but beware you will need to go through an additional step to convert the plain-text config to an obscured version every time you make a change. Also note that the method used to obscure the config file is easily reversible. For example:

pref("general.config.obscure_value", 13);
pref("general.config.filename", "mozilla.cfg");

Next, create your mozilla.cfg file. Open Firefox and enter about:config in the address bar to see all of the available configuration options. Note that the first line must be a comment, any options configured in the first line will be ignored.

If using an obscured config, this should be saved as mozilla.txt instead and converted to an obscured mozilla.cfg. Normaly you can do a online conversion at: http://alain.knaff.linux.lu/howto/MozillaCustomization/cgi/byteshf.cgi Unfortunately this web site is out of order for now.

If any issues you may alternatively run moz-byteshift.pl available here - https://developer.mozilla.org/en/Automatic_Mozilla_Configurator/Locked_config_settings The perl interpreter is required - http://www.activestate.com/activeperl

//

// Don't show the Firefox has been upgraded page
lockPref("browser.startup.homepage_override.mstone", "ignore");

// Don't check for the default browser
lockPref("browser.shell.checkDefaultBrowser", false);

// Disable automatic updates
lockPref("app.update.enabled", false);

// Set the homepage
lockPref("browser.startup.homepage", "http://www.example.com");
lockPref("browser.startup.page", 1);

// Proxy configuration
lockPref("network.proxy.backup.ftp", "your.proxy");
lockPref("network.proxy.backup.ftp_port", 3128);
lockPref("network.proxy.backup.gopher", "your.proxy");
lockPref("network.proxy.backup.gopher_port", 3128);
lockPref("network.proxy.backup.socks", "your.proxy");
lockPref("network.proxy.backup.socks_port", 3128);
lockPref("network.proxy.backup.ssl", "your.proxy");
lockPref("network.proxy.backup.ssl_port", 3128);
lockPref("network.proxy.ftp", "your.proxy");
lockPref("network.proxy.ftp_port", 3128);
lockPref("network.proxy.gopher", "your.proxy");
lockPref("network.proxy.gopher_port", 3128);
lockPref("network.proxy.http", "your.proxy");
lockPref("network.proxy.http_port", 3128);

lockPref("network.proxy.no_proxies_on", "192.168.*,localhost,127.0.0.1, glpi, glpi.your.domain");

lockPref("network.proxy.share_proxy_settings", true);
lockPref("network.proxy.socks", "your.proxy");
lockPref("network.proxy.socks_port", 3128);
lockPref("network.proxy.ssl", "your.proxy");
lockPref("network.proxy.ssl_port", 3128);
lockPref("network.proxy.type", 1);

You can find more details on locking preferences here: http://kb.mozillazine.org/Locking_preferences

Note that you can use pref() instead of lockPref() if you only want to set the default and allow users to change the setting later.

policies.js should be located in %PROGRAMFILES%\Mozilla Firefox\defaults\pref\ and mozilla.cfg should be located in %PROGRAMFILES%\Mozilla Firefox\.

For Firefox 10 (maybe previous version, not tested), to stop the prompt to 'send my usage stats and data to some server somewhere in the world', add to mozilla.cfg

lockPref("toolkit.telemetry.enabled", false);
lockPref("toolkit.telemetry.rejected", true);
lockPref("toolkit.telemetry.prompted", 2);

To set the startup web page for all new and current users when they press the button 'Restore to Default':

- In notepad, create a new file with the contents:

browser.startup.homepage=http://www.maths.cam.ac.uk

(change the URL to something more personal)

Save the file as browserconfig.properties

- Add this file to the archive file C:\program files (x86)\Mozilla Firefox\omni.ja by using 7-zip

7z.exe a "C:\program files (x86)\Mozilla Firefox\omni.ja" [path to browserconfig.properties]


To turn on the bookmark toolbar and display the menu bar, either

1. Copy the following into a file called C:\program files (x86)\Mozilla Firefox\defaults\profile\localstore.rdf (the dir \profile may not exist, if it doesn't, create it).

<?xml version="1.0"?>
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
         xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#PersonalToolbar"
                   collapsed="false"
                   currentset="personal-bookmarks" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul">
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#main-window"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#PersonalToolbar"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#navigator-toolbox"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#toolbar-menubar"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#nav-bar"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#TabsToolbar"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#addon-bar"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-box"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-title"/>
  </RDF:Description>
  <RDF:Description RDF:about="chrome://global/content/customizeToolbar.xul#CustomizeToolbarWindow"
                   width="533"
                   height="470" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#TabsToolbar"
                   currentset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-title"
                   value="" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#addon-bar"
                   currentset="addonbar-closebutton,spring,status-bar" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#nav-bar"
                   currentset="unified-back-forward-button,reload-button,stop-button,home-button,urlbar-container,search-container,bookmarks-menu-button-container,fullscreenflex,window-controls" />
  <RDF:Description RDF:about="chrome://browser/content/preferences/preferences.xul#BrowserPreferences"
                   lastSelected="paneMain" />
  <RDF:Description RDF:about="chrome://browser/content/preferences/preferences.xul">
    <NC:persist RDF:resource="chrome://browser/content/preferences/preferences.xul#BrowserPreferences"/>
  </RDF:Description>
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#navigator-toolbox"
                   tabsontop="false" />
  <RDF:Description RDF:about="chrome://global/content/customizeToolbar.xul">
    <NC:persist RDF:resource="chrome://global/content/customizeToolbar.xul#CustomizeToolbarWindow"/>
  </RDF:Description>
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-box"
                   sidebarcommand=""
                   width=""
                   src="" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#toolbar-menubar"
                   autohide="false"
                   currentset="menubar-items" />
</RDF:RDF>

OR

2. To manually create localstore.rdf, create a new firefox profile, customise the toolbars and quit firefox. Copy the file localstore.rdf is the profile just created to C:\program files (x86)\Mozilla Firefox\defaults\profile\localstore.rdf (the dir \profile may not exist, if it doesn't, create it).


Adding the settings to your package definition

Add the following to your package definition in the appropriate places:

   <check type="file" condition="exists" architecture="x86" path="%PROGRAMFILES%\Mozilla Firefox\defaults\pref\policies.js" />
   <check type="file" condition="exists" architecture="x64" path="%PROGRAMFILES(x86)%\Mozilla Firefox\defaults\pref\policies.js" />
   <check type="file" condition="exists" architecture="x86" path="%PROGRAMFILES%\Mozilla Firefox\mozilla.cfg" />
   <check type="file" condition="exists" architecture="x64" path="%PROGRAMFILES(x86)%\Mozilla Firefox\mozilla.cfg" />

   <install architecture="x86" cmd='%COMSPEC% /c copy /y "%SOFTWARE%\firefox\policies.js" "%PROGRAMFILES%\Mozilla Firefox\defaults\pref\"' />
   <install architecture="x64" cmd='%COMSPEC% /c copy /y "%SOFTWARE%\firefox\policies.js" "%PROGRAMFILES(x86)%\Mozilla Firefox\defaults\pref\"' />
	
   <install architecture="x86" cmd='%COMSPEC% /c copy /y "%SOFTWARE%\firefox\mozilla.cfg" "%PROGRAMFILES%\Mozilla Firefox\"' />
   <install architecture="x64" cmd='%COMSPEC% /c copy /y "%SOFTWARE%\firefox\mozilla.cfg" "%PROGRAMFILES(x86)%\Mozilla Firefox\"' />

Disable Automatic Updates

If Firefox is started by a user without administrative powers, automatic Firefox update will fail - which is harmless, but can confuse some users. To disable Firefox automatic updates, read the section on setting and locking preferences above first, and then add this line to your mozilla.cfg file:

lockPref("app.update.enabled", false);

Disable Profile Migrator

To prevent users being asked if they want to migrate their settings from Internet Explorer during first run create a file called 'override.ini' and add the following lines:

[XRE]
EnableProfileMigrator=false

Copy this file to %PROGRAMFILES%\Mozilla Firefox\browser\ or %PROGRAMFILES(x86)%\Mozilla Firefox\browser\ during installation.

Firefox Client Customization Kit

The Firefox Client Customization Kit makes it easy for administrators to customize Firefox with home page settings, proxies, extensions, etc. Also, you can lock preferences so that you users cannot change them. Version 1.2 has introduced support for Firefox 3.x, version 1.2.5 has dropped support for Firefox 2.x and only works for Firefox 3.x and later.

Use Windows Cert-Store

Firefox has for every user a own certificat-store. With this Option enabled, firefox will also use the windows-certificat-store - which can be filled via SSL_CA_Install. This works with Firefox 49 and later:

defaultPref("security.enterprise_roots.enabled", true);

External Links