In this post I’ll walk through the steps on how you can successfully deploy Mozilla Firefox with ConfigMgr 2012. For this particular post we’ll be deploying the current ESR (Extended Support Release) version. When writing this, the version is 24.2. We’ll also make sure that Firefox will not bug end-users with any update dialog windows.
Overview
- Download the installation file
- Create necessary files to disable automatic update function
- Script wrapper
- Create an application in ConfigMgr 2012
Download the installation file
Go ahead and download the Mozilla Firefox 24.2 setup file from the following location:
ftp://ftp.mozilla.org/pub/firefox/releases/24.2.0esr/win32/en-US/
Save it to your Content Library. In my case I’ll be saving the file as Firefox24.2.0esr.exe in:
\\fileserver\ContentLibrary$\Software\Firefox\24_2
I’m renaming the setup file just to eliminate errors in the script that we’ll be using later. It’s important that the file doesn’t have any spaces in the file name, or the script will not function properly. If you’d like to name it something else, go ahead and do so but remember to update this line in the script below:
strPath = """Firefox24.2.0esr.exe""" & " -ms"
Create necessary files to disable automatic update function
When you’re deploying Mozilla Firefox in an enterprise where users are not allowed to install applications themselves (except from the Application Catalog), I’d recommend that you turn of the Update function. Doing so requires two files to be created and stored in the same location as of the setup file. In this post, we’ve put the setup file in the Content Library mentioned above. The two files that needs to be created are the following:
local-settings.js
The local-settings.js file should contain the following:
pref("general.config.obscure_value", 0); pref("general.config.filename", "mozilla.cfg");
mozilla.cfg
The mozilla.cfg file should contain the following:
lockPref("app.update.auto", false); lockPref("app.update.enabled", false);
As already mentioned, it’s important for the script below to function properly that you create these two files and put them in the same directory as the Mozilla Firefox setup file. The link below explains more in detail regarding the two files that we’ve created:
https://blog.danielburrowes.com/2013/06/mozilla-firefox-disable-auto-update.html
Script wrapper
Save the below script as install.vbs and put it in the same location as where you downloaded the setup file for Mozilla Firefox. In this case that would be \\fileserver\ContentLibrary$\Software\Firefox\24_2. You can never repeat something that’s important to many times! This script will close any running instances of firefox.exe, execute the Mozilla Firefox setup and wait for it to finish. Once the setup has finished, it will copy the local-settings.js and mozilla.cfg into its required locations.
Set objWMIService = GetObject ("winmgmts:") foundProc = False procName = "firefox.exe" For Each Process in objWMIService.InstancesOf ("Win32_Process") If StrComp(Process.Name,procName,vbTextCompare) = 0 Then foundProc = True procID = Process.ProcessId End If Next If foundProc = True Then Set colProcessList = objWMIService.ExecQuery("Select * from Win32_Process where ProcessId =" & procID) For Each objProcess in colProcessList objProcess.Terminate() Next WScript.Sleep(1000) End If strPath = """Firefox24.2.0esr.exe""" & " -ms" Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run strPath, 1, True Set WshShell = Nothing Set objShell = WScript.CreateObject("WScript.Shell") strFileToCopy1 = "local-settings.js" strFileToCopy2 = "mozilla.cfg" strFolder1 = objShell.ExpandEnvironmentStrings("%PROGRAMFILES(x86)%") & "\Mozilla Firefox\defaults\pref\" strFolder2 = objShell.ExpandEnvironmentStrings("%PROGRAMFILES(x86)%") & "\Mozilla Firefox\" Const OverwriteExisting = True Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists(strFolder1) Then objFSO.CopyFile strFileToCopy1, strFolder1, OverwriteExisting End If If objFSO.FolderExists(strFolder2) Then objFSO.CopyFile strFileToCopy2, strFolder2, OverwriteExisting End If
Create an application in ConfigMgr 2012
1. Create a new Application and on the General page select Manually specify the application information. Click Next.
2. On the General Information page, give the application a name, version etc that you feel is needed for your environment and click Next.
3. Enter the information that will be displayed in the Application Catalog if you decide to distribute the application to end-users. Click Next when you’ve added the necessary information for your environment.
4. Select Add on the Deployment Types page. Now the Create Deployment Type Wizard appears.
5. On the General page, select Script Installation as Type and click Next.
6. On the General Information page, give the deployment type a name and fill in any other necessary information for your environment. Click Next.
7. Enter the path to where you’ve put the Firefox setup file and the files created above in the Content Location field. Configure the following:
Installation program: install.vbs
Installation start in: <empty>
Uninstall program: helper.exe -ms
Uninstall start in: %ProgramFiles(x86)%\Mozilla Firefox\uninstall
When done, click Next.
8. On the Detection Method page, click Add Clause. Configure the following:
Setting Type: File System
Type: File
Path: %ProgramFiles(x86)%\Mozilla Firefox
File or folder name: firefox.exe
This file or folder is associated with a 32-bit application on 64-bit systems: Checked
The file system setting must satisfy the following rule to indicate the presence of this application: Checked
Property: Version
Operator: Equals
Value: 24.2.0.5087
When done, click Next.
9. On the User Experience page, configure the following:
Installation behavior: Install for system
Logon requirement: Whether or not a user is logged on
Installation program visibility: Hidden
Maximum allowed runtime (minutes): 30 (this can be set to whatever suites your environment)
Estimated installation time (minutes): 2 (this can be set to whatever suites your environment)
When done, click Next.
10. On the Requirements page, add any requirement that might be necessary for your environment. I always add a requirement for total amount of free disk space on the system drive, configured as the below image. Click Next when done.
11. We’ll not configure any dependencies for this application, but if your environment requires it you can do that now. Click Next.
12. On the Summary page, click Next.
13. On the Completion page, click Close.
14. You should now be back at the Create Application Wizard. Click Next.
15. On the Summary page, click Next.
16. On the Completion page, click Close.
You can now go ahead and deploy this application to a group of test systems or in your lab environment. Remember to distribute the application to your Distribution Points or even your Distribution Point Groups.
That’s all!
Hi there. Installation working great but Uninstall won’t work.
On below:
Uninstall program: helper.exe -ms
Uninstall start in: %ProgramFiles(x86)%\Mozilla Firefox\uninstall
I get:
0x87D00325(-2016410843)
It’s impossible to uninstall Firefox via SSCM after installation.
Nice write up. Having a problem that in Software Center it shows that Firefox is downloading but stays at 0% and never installs.
Anyway to fix this?
Does this work for 32bit and 64 bit systems?
To my knowledge it should.
Regards,
Nickolaj
Nice post. I was checking continuously this blog and I am
inspired! Very helpful iinfo specially the remaining section 🙂 I deal with such info a lot.
I used to be seeking this particular information for a long time.
Thanks and good luck.
Where did you get specific version number for firefox? When looking from firefox help -> about firefox it shows only (i.e) 36.0.4. What does the 5087 stand for in your example?
I’ve found it in the Details tab (properties on firefox.exe).
Regards,
Nickolaj
Here’s a screenshot from newest firefox detail tab:
https://postimg.org/image/6sbzvogbj/
Are you talking about file version, or product version? File was downloaded from firefox homepage:
https://www.mozilla.org/en-US/firefox/all/
Hello all,
So I’m attempting this process with Firefox 40.0. I’ve got the package created, distributed and deployed. However when I try to install it on one of my test machines, it downloads fine but shorting after starting to install it fails. I’ve checked the AppEnforce.log but there are no error for my install. Will this setup work for non ESR version of Firefox?
What is the best way to determine the full version number of Firefox ESR 38.1? I want to make sure my detection method in my deployment is accurate.
I set this application up but am getting an error when it attempts to install:
The system cannot find the file specified.
C:\Windows\ccmcache\4l\install.vbs
I checked the location and the file is there so I retried the install and got the same error. Anyone seen this happen with this setup?
Hi Robert,
This sounds quite odd, could you please paste a snippet from the AppEnforce.log on the client where it fails?
Regards,
Nickolaj
I would suggest clearing the cache on the client; that will force it to re-download it. Also, try re-running the machine policy retrieval task from the Config Mgr control panel applet on the client. If you updated the deployment at all, it will create a new version and the client may not be aware and is trying to download a previous version from the DP that isn’t there any more.
FYI X86
If you want this to work correctly for x86 machines you must edit the script so that the “mozilla.cfg” and “local-settings.js” files copy to the Mozilla Firefox folder so that configuration settings are applied inside:
C:\Program Files\Mozilla Firefox
Just change the %PROGRAMFILES(x86)% to %PROGRAMFILES% as seen below:
strFolder1 = objShell.ExpandEnvironmentStrings(“%PROGRAMFILES%”) & “\Mozilla Firefox\defaults\pref\”
strFolder2 = objShell.ExpandEnvironmentStrings(“%PROGRAMFILES%”) & “\Mozilla Firefox\”
Thanks Ben for contributing to this post!
Regards,
Nickolaj
FYI ESR 31
To get this to work for ESR 31 you have to ensure you have the full version number in the Detection method “Equals” section.
31.2.0 will not work since this is not the full version number and SCCM is looking for an exact value.
If you go to the properties of firefox.exe and go to details you will see the full version number.
Enter version number 31.2.0.5397 and your detection method will start working correctly.
Happy packaging!
I am following these instructions, but after my deployment I get an error stating Past Due-Will be Retired. My clause stated the same version number as indicated in the properties of firefox.exe
Hi Kirill,
Have a look in the AppEnforce.log file for the complete error message you received on that specific client. What does it show?
Regards,
Nickolaj
Hi, i’m having trouble detecting a FirefoxESR 31.0 installation using sccm2012 and file version detection on the .exe file for version 31.0. it keeps coming back in appenforce.log that the app isn’t detected even though it installs successfully. does anyone have a workaround? thanks.
To get this to work for ESR 31 you have to ensure you have the full version number in the Detection method “Equals” section.
31.2.0 will not work since this is not the full version number and SCCM is looking for an exact value.
If you go to the properties of firefox.exe and go to details you will see the full version number.
Enter version number 31.2.0.5397 and your detection method will start working correctly.
Great write up and very useful, thanks.
Do you know how I can get the Firefox SCCM install to automatically add/install an add-in to Firefox?
Jeff
How would I modify the script if I needed to copy a folder and all its subfolders to the Mozilla Firefox directory