Preinstalling Mozilla products for your corporate environment is easy
Typically, after installing Mozilla products in a corporate environment, you need to additionally install:
- standard set of plugins for the company
- make typical settings
Why not integrate the necessary plugins and typical settings into the distribution?
The purpose of this article is to show how you can repack a Mozilla distribution by adding the necessary components.
I ’ll make a reservation right away : I won’t consider installing any distribution kit in a corporate environment — many articles have been written about this and there are many ready-made or home-made tools.
Second disclaimer : distributing a modified Mozilla distribution outside your organization without signing an additional agreement with Mozilla will violate your license agreement.
But our goal is to prepare an internal distribution for our organization, so everything is in order.
For repacking you will need:
Product distribution (in this example, Firefox) -www.mozilla.org/en-US/firefox/organizations/all
7zip archiver - www.7-zip.org/download.html
SFX module for 7zip - svn.smedbergs.us/cck-repack/trunk/resources/7zSD. sfx
“Once I caught Gerasim a goldfish.
And as he did not try to explain that he wanted a big house, a cool car and a beautiful wife - he received only three cows.
Properly worded - half done ”
Therefore, before repacking the distribution kit, you should prepare:
- List of plugins that need to be integrated into the distribution kit and their distributions
- The list of settings is by default with the values that need to be integrated into the distribution kit (It may be necessary to add default settings for integrable plugins)
There is nothing easier: go to the folder with the downloaded distribution package and unzip it 7zip.
I got the following command:
"C:\Program Files (x86)\7-Zip\7z.exe" x .\"Firefox Setup 24.4.0esr.exe" -o"Firefox Setup 24.4.0.esr"
After unpacking the resulting folder, we are primarily interested in the path core \ browser \ extensions. For Firefox up to version 24esr and for Thunderbird this path will be core \ extensions (I do not follow non-ESR versions).
If you put extensions into this folder, then they are integrated into the rebuild distribution. I add the Mozilla GPO plugin extension so that in the future you can manage any settings from group policies. You can immediately attach an xpi file, you can unzip it and attach an extension folder. There may be a problem with the name of the file / folder - see the solution to the problems at the end of the article.
You can also set some default settings.
Personally, I prefer to run them through the GPO, but maybe the distribution will not be installed on a PC in the domain, so you should not neglect these settings either.
To do this, in the core \ defaults \ pref folder, you need to create a file with the default settings. The file must be encoded in UTF-8 and it should be named all- <company name> .js. For example all-contoso.js:
Without this setting, Mozilla will ask the user whether to install nested plugins. By default, this parameter value is 15. More can be found here.
After the modification, go to the folder with the corrected distribution (where the folders core, win32 and setup.exe are located) and pack it into the archive. I got the following command:
"C:\Program Files (x86)\7-Zip\7z.exe" a -r -t7z app.7z -mx
Create the app.tag file (in UFT-8 encoding!) In the same folder, which tells sfx what to run after unpacking the archive, with the contents:
;!@Install@!UTF-8! Title="Firefox 24.4.0 ESR customized" RunProgram="setup.exe" ;!@InstallEnd@!
Copy to the same folder 7zSD.sfx.
We “glue” the sfx-module, app.tag and the application archive:
copy /B 7zSD.sfx+app.tag+app.7z "Firefox Setup 24.4.0.esr.custom.exe"
Now after installation from the created distribution kit:
- All included add-ons are automatically installed
- All user profiles will use your default settings (If the setting value is not explicitly specified in the profile)
Possible problems and their solution.
If your default settings are not applied:
- Check the name and location of the settings file in the distribution kit (national characters, spaces and special characters in the file name are undesirable)
- Check the default settings file encoding (Should only be UTF-8 without BOM)
If the integrated plugins are not “caught”:
- Check the value of the extensions.autoDisableScopes parameter. If plugins from the Firefox folder are prohibited, the user will be notified that someone is trying to install the plugin.
- Check that you have correctly named the file (or the plugin folder). The plugin file should have a name of the form id.xpi, where id is the plugin identifier as in install.rdf in the em: id field inside the plugin. The plugin folder name must match its id.
The surest way to ensure that this condition is met is: install the plug-in through the Mozilla plug-in management interface, and then copy the plug-in folder (or file) from the user profile to the created corporate distribution.
PS “Inspiration” I drew from the article:
But I had to deal additionally with the file name for the default settings, and also figured out why some plugins did not want to integrate.