2 Replies Latest reply on May 28, 2015 5:18 PM by wmartinz

    Mozilla ESR disable autoupdate after is patched - how?


      I am patching Firefox to 31.6.0 ESR.  I want to disable auto update.

      I have created the two files suggested by Mozilla local-settings.js and Mozilla.cfg.

      I have tested them and they will disable auto update when placed under:

      c:\program files (x86)\Mozilla Firefox\defaults\pref\local-settings.js

      c:\program files (x86)\Mozilla Firefox\Mozilla.cfg

      So I know it works manually.

      I even have a vbs script that can also copy these files to its right location.


      The package by itself installs Firefox fine and puts all the files including the ones mentioned above under

      C:\windows\software distribution\download\install (has all files including vbs script).


      My question is: how do I configure it so that it runs the script or even just copies the two files to the right location after the package has been installed?


      I configured the Package Boot Editor and added After applying package:

      Program name: cscript



      Command line: "install2.vbs" (yes, in quotes, also tried it without quotes)

      Selected - Run program from package directory


      There has to be a way to run this script via command line.  It does require admin rights to run the script from what I discovered.


      Any ideas? Any samples of how you run a program from the command line and parameters used?









        • Re: Mozilla ESR disable autoupdate after is patched - how?

          The way you currently have package boot configured it is trying to run cscript from the package directory which does not exist. You should set package boot to run cscript.exe from the system32 directory then include the parameters to run your script. The script will need to handle setting it's working directory properly.


          Any commands run by package boot are executed as the system account so privileges should not be an issue.


          I have several packages that run commands directly and the basic setup I usually use is to have package boot call cmd.exe from system32 and include /c in the parameters followed by the command I need to execute.

          1 of 1 people found this helpful
          • Re: Mozilla ESR disable autoupdate after is patched - how?

            Thanks for the tip - it worked!

            On the Package Boot Editor I added the following in the After applying package

            Run a Program

            - Program name: cmd.exe

            - Command-line parameters: /c cscript.exe %modulepath%\install2.vbs

            - Run program from specified directory: Directory % : %System%


            That was it!

            I included in the package the install2.vbs script (see script text below), local-settings.js, mozilla.cfg (I've also included the text for these files further below in case someone else can benefit from this)

            Pubish then approve package and it will appear as a windows update for the clients.


            install2.vbs text (copies the local-settings.js and Mozilla.cfg files to the appropriate directories to disable auto update from updating Mozilla every time it opens!)

            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


            If foundProc = True Then

                Set colProcessList = objWMIService.ExecQuery("Select * from Win32_Process where ProcessId =" &  procID)

                For Each objProcess in colProcessList   




            End If


            strPath = """Firefox Setup 31.6.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



            text for local-settings.js

            pref("general.config.filename", "mozilla.cfg");

            pref("general.config.obscure_value", 0);



            text for mozilla.cfg

            lockPref("app.update.auto", false);

            lockPref("app.update.enabled", false);

            1 of 1 people found this helpful