Hey there. I’ve been a bit quiet of late but sadly I am not doing much in the way of ground breaking IT (lol?) due to stuff going on at work. We’ve got a restructure of the entire Company going on, coupled with an internal restructure of the IT division in conjunction with a Voluntary Redundancy Scheme (where noone seems to know who will still be here once implemented).
I thought I’d plug the gap by posting up my recipe for Firefox. I’ve seen a few ways of virtualising this app, but as yet none quite like mine. All the files I use have their contents in this post; you’re free to copy them ad inifitnitum.
Bear in mind that I started this recipe waaaaaay back with SoftGrid 4.2 and Firefox v3.x! Oh and another thing, I rolled out App-V 5 SP3. With this version of the Sequencer, there is no PVAD any more. As in, you don’t need to know the install directory path in advance!
Due to certain business requirements we have, Firefox needs to handle PDF’s in a particular way. So this recipe will require Adobe Reader (or whatever is your poison) installed before you start sequencing. Make sure you go through the first run of Reader before you start sequencing!
Load the template; this is important as you want to include things that otherwise would not be included.
Run the Firefox installer; make sure you go for the custom install option and then untick the option to install that annoying Maintenance Service. As a rule of thumb I tick the default browser option to ensure the key changes are captured, however in this environment we don’;t have Firefox as a default browser.
Complete the install, and let the browser launch. We need certain first run files in place before going further.
Close Firefox down, and we will look at my customisations. There are three files which affect Firefox’s behaviour:
I have found that some Firefox settings can be set from Browser-Custom.JS, but not Mozilla.cfg and vice versa. it is also worth noting that these two files work differently, and live in different locations. The Browser-Custom.JS is a generic file and used to come as part of Firefox; you probably won’t have one! However this file is needed, as it “enables” the Mozilla.cfg file.
The contents of the Browser-Custom.JS
Note the reference to the Mozilla.cfg above!
The contents of the Mozilla.cfg:
The Mozilla.CFG is very useful, as it allows you to use the lockPref option. This will grey out the setting to stop the user(s) from playing. it is worth bearing in mind that originally these fields were case-sensitive. I don’t know if they still are, but something to bear in mind.
Copy and paste the Mozilla.cfg into the root of the Firefox install folder as per below:
Pop the Browser-Custom.JS into the “Firefox install folder”\defaults\pref as per below:
In general, if a setting doesn’t seem to have applied, try it in the other file.
Finally the profiles.ini. If configured correctly, you can set Firefox to have a roaming profile. The contents of the profiles.ini:
…by redirecting the Firefox profile to a network drive, wherever you have said network drive, you’ll have your Firefox profile. Obviously you can adapt this to a USB location too. Put the profiles.ini into the Firefox folder under the appdata location, as per below:
For the sake of package size, I delete the Firefox profile which was generated from our first launch. It’s not necessary, but I like to keep things tidy.
The only drawback to this is, if there is no access to the profile location, then Firefox will error. You will also need to think about how the Firefox profile gets created, as this won’t happen automatically. You could use a Group Policy Preference, however I went for a basic Powershell script. It checks to see if the folder exists, and creates one if it does not:
if (Test-Path U:\fire_pro)
$result = “Firefox Profile exists!”
$(MkDir “U:\fire_pro”).Attributes = ‘Hidden’
One thing to bear in mind, and this is something I keep forgetting to do, is to add the Powershell script to the sequence before you save it! There is a specific location for scripts, under the Package Files tab:
If you recall I earlier mentioned about ticking the box to have the browser as default even though we don’t use it as a default browser. At this point I remove the file type associations. It may seem convoluted, but I recall someone stating that if you don’t tick the box, any future key changes won’t register.
You’ll then have to edit the DeploymentConfig.XML to include the following, assuming you call your Powershell script fire_pro.ps1:
…and that’s pretty much it! When you next launch Firefox, it should obey one’s will.