Automated deployment of Firefox with extensions, themes, and pre-configuration

You may use this product in accordance with the Mozilla Public License 1.1.  Please give credit where credit is due.

By Bob Templeton


UPDATE Feb 6, 2005:


UPDATE January 12, 2005:

WSH error:
Line 210
Char 5
Error:  Class is not licensed for use
Code: 80040112
Source: null

UPDATE January 11, 2005:


UPDATE December 19, 2004:


UPDATE December 9, 2004:

Due to a huge workload, family, and Christmas, I'm not sure when I'll be able to address the To do's.  I will try and bang it out by the end of December...but no promises. :)


UPDATE October 29, 2004:


Somebody may have already figured out a better way of doing this, but I thought I’d share the method I'm using to deploy Firefox to my division.  This guide will show you how to build and deploy custom Firefox configurations for your business, school, or home networks.  This has been tested on XP, 2000, and 2003.

There are two ways you can build a deployment package:
1. Automated Method
2. Manual Method
 


Automated Method:

1. Install Firefox on your staging machine.

2. Install all the desired themes, extensions, and search engines.

3. Configure all of the desired options for Firefox (Security, Proxy, Home Page, Bookmarks Etc.).

4. Download my Firefox Deployment Builder: FFDeploy.zip (460K) and extract into a directory of your choosing.
All files in the zip must remain in the same directory.

5. Run the FFDeploy.vbs and you will be presented with this dialog:

Once you've carefully read all of the text and you press the OK button, you will be asked to locate the FIREFOX.EXE (where Firefox is installed).

Select the FIREFOX.EXE and press the Open button.  Now, you will be asked about favorites conversion.

The process of conversion uses an old freeware utility I found called Favorites To Bookmarks And Back. It's not bad in a pinch, but I have seen it have problems when the user has a massive favorites structure.  This dialog really only determines if the FTBAB.exe is copied into the deployment directory.  If the file is not there, the CreateProfile.vbs will simply skip the favorites conversion. Personally, I don't use this option, I prefer to have Firefox to the importing itself.

The program will then create a "Firefox_Deployment" directory on your desktop and place all the files needed for deployment into this directory.  During this process, the text box in main dialog will display a log of what his happening and it's current status.  When the creation of the deployment directory structure is complete, you will be asked if you wish to create a self-extracting/self-installing EXE for deployment.

NO:  If you select NO, the process ends here and you are left with a "Firefox_Deployment" directory on your desktop.  You can copy this directory up to a server for deployment by other means such as a batch file. 

The deployment batch file might look like this (2 lines):
xcopy/s/e "\\servername\sharename\Firefox_Deployment\*.*" "C:\Program Files\Mozilla Firefox\*.*"
"C:\Program Files\Mozilla Firefox\CreateProfile.vbs"

Just remember, the actual user account must be the one to run CreateProfile.vbs...NOT a deployement-type account.

...and you're done!

YESIf you select YES,  the program will zip everything in the "Firefox_Deployment" directory and then create a self-extracting EXE from the zip file.  You will then be asked if you want the EXE to automatically create a Firefox profile for the user running the EXE.

NO:  In most large-scale deployment environments, general users do not have the privileges to create files in the Program Files directory structure.  If that is the case in your environment, you will probably want to select NO here.  That way, you can push the deployment EXE out via SMS or any other deployment tool and put a line in the login script to check for the existence of a Firefox profile and create one as needed.

The login script entry might look like this (all one line):
if not exist "%APPDATA%\Mozilla\Firefox\Profiles.ini"
"C:\Program Files\Mozilla Firefox\CreateProfile.vbs"

Just remember, the actual user account must be the one to run CreateProfile.vbs...NOT a deployement-type account.

YESIf you select yes, when the resulting EXE is run, CreateProfile.vbs is immediately called when extraction is completed to create a fresh Firefox profile for the user running the EXE.  Select this option when users have the right to create things under Program Files or if you're making a distribution for home computer installations.

After you select the option you wish, a Firefox_Deployment.exe will be placed on your desktop for your deployment pleasure.

Note:  Both the Firefox_Deployment.exe and CreateProfile.vbs programs run completely silent (no user feedback).

You're done!


Manual Method:

1. Install Firefox on your staging machine.

2. Install all the desired themes, extensions, and search engines.

3. Configure all of the desired options for Firefox (Security, Proxy, Home Page, Bookmarks Etc.).

4. Create a directory in Firefox’s home directory for the profile to be deployed. C:\Program Files\Mozilla Firefox\GlobalProfile is used in this example.

5. Copy the entire profile directory you just set up into the GlobalProfile directory you created in the Firefox home directory. You want to copy everything under C:\Documents and Settings\USERNAME\Application Data\Mozilla\Firefox\Profiles\default.XXX\*.* into the GlobalProfile directory.

6. Edit the C:\Program Files\Mozilla Firefox\GlobalProfile\Chrome\chrome.rdf and change all the hard coded paths to ****CHANGETHISSTRING****

Example: Change
jar:file:///C:/Documents%20and%20Settings/USERNAME/Application%20Data/Mozilla/Firefox/Profiles/default.XXX/extensions/...

to

jar:file:///****CHANGETHISSTRING****/extensions/...

7. Download Favorites To Bookmarks And Back and place it in the C:\Program Files\Mozilla Firefox directory. This freeware program will allow you to automatically convert the user's Favorites into a Bookmarks.html file in the Firefox profile.

8. Download my CreateProfile.vbs (32K) and place it in the C:\Program Files\Mozilla Firefox directory. This is a simple VB program I wrote that does several things:

9. ZIP/RAR the Desktop and Start Menu Shortcuts and the C:\Program Files\Mozilla Firefox directory structure. USE ABSOLUTE PATHS WHEN CREATING THE ARCHIVE. Convert this archive to a self-extracting exe that will execute the C:\Program Files\Mozilla Firefox\CreateProfile.vbs upon completion of extracting.

Now you're done. After running the self-extracting exe and it runs the CreateProfile.vbs, the user that runs this will end up with Firefox installed in C:\Program Files\Mozilla Firefox, a pre-configured profile in C:/Documents and Settings/USERNAME/Application Data/Mozilla/Firefox/Profiles/USERNAME, and Shortcuts on the Desktop, Start Menu, and Quick Launch bar.

Alternatively, you can skip the whole ZIP/self-extracting thing by copying the C:\Program Files\Mozilla Firefox directory structure up to a share on a server and making a BAT file that will copy it all down to the client machine and run the CreateProfile.vbs. This method could also be used for silent installs. Something like:

xcopy/s/e "\\servername\sharename\Mozilla Firefox\*.*" "C:\Program Files\Mozilla Firefox\*.*"
call "C:\Program Files\Mozilla Firefox\CreateProfile.vbs"

You can also make sure that if a new user logs into a system that already has Firefox, but they don’t have a profile, one would be created for them. A BAT file like this could be called in the login script or the startup group:  

if not exist "%APPDATA%\Mozilla\Firefox\Profiles.ini"
"C:\Program Files\Mozilla Firefox\CreateProfile.vbs"

Note:  The CreateProfile.vbs program runs completely silent (no user feedback).


Aftermath:

Well, that about does it.

I hope this helps the other administrators out there that wish to do the same thing. You can email me with any questions at  bob@dbltree.com

Good luck!

Notes:  The FFDeploy tool is a work-in-progress.  It doesn't have very much error checking in it, but I've tried to account for most of the variables in a deployment situation.  All the program really does is everything listed in the Manual Method of building a deployment package for you.  Included in the FFDeploy.zip are several freeware tools that are allowed to be distributed.  These tools are: Favorites To Bookmarks And Back, Info-Zip, and SFXMaker.

Updated December 9, 2004


Keywords for searches: deployment rollout enterprise unattended silent automated