REM State

26 May

Firefox 3 RC1

So, with our core set of command-line tools installed, let’s get into installing something interesting, shall we?

Firefox was a bit difficult to unravel at first, but as with most things, once you know the trick, it’s fairly straightforward. First up, grab the latest Firefox 3 beta in your favorite language. You can unpack the self-extracting file with 7-Zip, using a simple right-click action. Once you have the unpacked files, you should create an INI file as per Mozilla’s setup documentation — assuming you’ve named your INI file FirefoxSetup.ini, you can issue a command like the following to perform the actual setup:

C:\Temp\Firefox>setup.exe /INI="C:\Temp\Firefox\FirefoxSetup.ini"

But it doesn’t stop there. You can also take the opportunity to install your favorite Firefox extensions from the command line. I decided to create a dedicated sub-directory (”extensions”), and placed all the XPI files of my favorite extenions into that folder. The following bit of batch script takes care of installing all the XPIs found in this folder:

SET TARGETDIR="D:\Program Files\Mozilla Firefox"
SET FIREFOX=firefox.exe -quiet -safe-mode
SET EXTENSIONS=%CD%\extensions
FOR %%F in (”%EXTENSIONS%\*.xpi”) do (
start /D%TARGETDIR% /wait %FIREFOX% -install-global-extension “%%F”
)
POPD
SLEEP 5
TASKKILL /FI “WINDOWTITLE eq Import Wizard” /IM firefox.exe

There are some caveats to this technique, however. First off, the method is not entirely silent — upon starting the Firefox executable for the first time, the “import” dialog appears, asking if you’d like to bring your settings over from Internet Explorer. There might be a way around this, but if there is, I haven’t tinkered enough to find it; I’ve opted to just kill the process with TASKKILL. Second, some extensions require that you go to the Tools > Add Ons menu, perform an update, and restart Firefox before they will work. I haven’t found a way to get the extensions to update from the command-line yet, so this would remain a manual step that each user would have to take when they start the browser for the very first time after installation. Third, not all extensions appear to support this mode of installation — specifically, RefControl cannot be installed this way if Firefox is installed to a location other than C:\Program Files\Mozilla Firefox\ (or possibly %ProgramFiles%\Mozilla Firefox\). Finally, some extensions perform various actions when you first install them, and all of these actions will happen when you start up Firefox for the very first time (and/or when you restart firefox after updating extensions) — this can be distracting and obnoxious. It is probably possible to more tightly integrate the extensions into the directory structure of the Firefox setup files; however, that’s far more trouble than integrating default extensions should be. Hopefully in the future, we’ll see this method polished up, so that folks can more readily manage Firefox installation and administration in a remote or automatic fashion.

2 Responses to “Firefox 3 RC1”

  1. AvatarSam
    1

    Nice writeup - can’t believe there’s more info here than can be found at the mozilla site.

    As for disabling the import wizard, adding the following to your INI seems to do the trick:

    [XRE]
    EnableProfileMigrator=false

    Now I just want a switch that disables the ‘make firefox your default browser’ behaviour that the installer now performs by default. Any ideas?

    Why are programs becoming more and more invasive? At least Firefox doesn’t force other stuff on you by default like Adobe’s Flash Player + Google Toolbar, or Sun’s Java + OpenOffice… yet.

    Reply to this comment.
  2. AvatarQuandary
    2
    Author Comment

    Yeah, seriously — you’d think that the Mozilla folks would understand by now that off in Corporate Land, silent install is an absolute necessity. Cracking the home desktop is all well and good, but it’s not like they can expect to keep growing if they don’t think of the workplace as well. It shouldn’t take as much effort as it did to figure this procedure out.

    As for deselecting the default browser option… I’m not personally interested in that one, but I presume that there’s a registry setting that we could poke post-install. AFAIK, Firefox et. al. just call some Windows API to set the defaults. I might tinker with it later, if nobody beats me to it. :)

    Reply to this comment.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Comment Preview:

© 2008 REM State | Entries (RSS) and Comments (RSS)

Global Positioning System Gazettewordpress logo