Talk:Installer:Command Line Arguments

From MozillaWiki
Jump to: navigation, search

Valid information? (for Firefox 3.5)

Is the information in this page still valid? If so, for which versions? Dwefv 11:13, 20 July 2009 (UTC)

The installer (3.0.4) does not appear to return any error indication if the installation fails, e.g., if the current account can't write to the installation directory.

--Harry Johnston 11:35, 25 November 2008 (NZDT)

options for user installation

Would dearly love to see command-line arguments to set up user installation and default identity items, especially the local-folders area name, username, and password! If that could be done, Thunderbird could be easily pushed to a whole Windows domain :)

--Jonathanbrickman0000 14:07, 15 December 2006 (PST)

Thunderbird itself would need to provide these options since it understands user profiles, etc. and the installer does not. Robert Strong 17:02, 24 June 2008 (PDT)

command line arguments to uninstall firefox 2.0

Can anyone give me some pointers on this?

I need to do a silent uninstallation of firefox through the fir. What script can I run for this?

Thanks LOTS

Can't help you with this, but I have a question about the config.ini file. I have set CloseAppNoPrompt=true, but when updating Fx to version, the install does NOT close Fx if "Warn me when I attempt to close multiple tabs" has not been un-checked. Is there another value I could use? (force, always close etc)

  • Regretfully there is no way to do this without killing the process and we are removing that capability from the installer for Firefox 3.0 so it will always prompt. Robert Strong 02:14, 25 August 2007 (PDT)

?? Robert Why would you want to remove a feature that allows for corporate deployment. If you remove this feature, then corporations that have to deploy the update will have to kill the firefox.exe processes themselves.

  • Because there is no way for the installer to do so across user sessions and the installer now supports installing files on OS restart when they are in use Robert Strong 17:02, 24 June 2008 (PDT)

Does that really work?

I tried the /S and -ms options. But the stock Firefox setup.exe's as distributed ignore these? Am I understanding something wrong? What is the secret to get this working?

  • Using Firefox 2.0 this works for me. Robert Strong 02:14, 25 August 2007 (PDT)

Doesn't work at all for now!

The /D and /INI switches don't seem to work at all. I tried the following line in an install.cmd file: "%~dp0Firefox Setup" /S /D="D:\Browsers\Firefox" /INI="%~dp0Firefox.ini"

The /S switch seemed to work: it was silent. However, FF installed into it's default directory on C:\, not into D:\Browsers\Firefox. That path was also specified in the .ini file.

The page says that if /INI is specified, the installer always runs in silent mode. This was not the case. I had to add /S. Rduke15 03:25, 9 January 2008 (PST)

more on /D not working...

things seem to work ok for me on windowns xp using the options

 firefox-installer.exe /S /D \path_to_install_directory

(note no equal sign as in /D=\path... or the way it is show in some of the documentation)

After many attempts on Vista I can't seem to get the /D option to work. It just installs to c:\Program Files\Mozilla Firefox... or what ever the default setting is. I tried to make sure every path permission, security & sharing settings were opened up for the max flexibility but that didn't seem to help.

INI file question?

Do I remove the ; at the begining of the line with the switch to make it work and leave it to not enable the switch?

Thanks in advance.


  • I had the same question so I took the liberty of adding this info to the example .ini file. Itismike 06:35, 4 March 2011 (PST)

Is there a way to force the installer to use automatically a particular ini ? E.g. by giving a default name to it ? Many .exe call automatically the .ini or .profile having their name.

/INI switch requires full path

The following command doesn't work

"Firefox Setup 3.0.1.exe" /S /INI=MyConfig.ini

The reason this doesn't work is because the "Firefox Setup 3.0.1.exe" extracts to the temp file. Then the extracted setup.exe looks for the MyConfig.ini in the directory that setup.exe is in.

For deployment in corporate environments, the full path is not always going to be known. Most installers do not require a full path if the configuration file is in the same directory as the installer file. The Firefox Setup 3.0.1.exe setup does not work this way. I would recommend fixing the next installer so that if no path is given, the path that Firefox Setup 3.0.1.exe was launched from is added to the front before passing to the setup.exe that runs from the temp directory.


You can get around this problem with a simple batch file, here's mine as an example:
echo [Install] > ffsetup.ini
echo InstallDirectoryPath=%ProgramFiles(x86)%\Net Progs\Firefox\ >> ffsetup.ini
echo DesktopShortcut=false >> ffsetup.ini
echo StartMenuDirectoryName=Net Progs\Mozilla Firefox >> ffsetup.ini
setup /INI="%CD%\ffsetup.ini"

For those having difficulty getting command line switches to work, please bear in mind that the .exe you downloaded from Mozilla is a self extracting archive that calls another file, setup.exe, which is stored inside. I'm not sure what, if any, switches work with the original self extracting archive, but to use the /INI= switch requires that you uncompress the archive [e.g. with 7-zip], & use the switch on the setup.exe file that was inside the Firefox Setup <version>.exe. Alien 07:13, 25 September 2008 (UTC)

What options are available in the ini file when installing using the /INI option?

I've read the wiki for command line arguments ( however ther problem I'm running into is that I don't want the FireFox to be the default browser. The documentation, aside from the aforementioned link is lacking, at best. The ability to do unattended installs is paramount for me and while I'd like to give my users a choice of browsers I don't want this overwriting a machine's default browser setting.

Thanks in advance,


 -- When I deploy Firefox 3.0.4 the default browser is not changed. Rhyous 

1:33 PM MST 12/17/2008

This was due to bug 440704 and was fixed as of Firefox 3.0.2 Robert Strong 07:27, 28 July 2009 (UTC)

The DesktopShortcut=false option in the INI does not work when Firefox is running = more edit, I have it diagnosed and pinpointed to a where I can duplicate it when I run it manually or deploy with LANDesk.

I work for LANDesk and I am trying to write the best way to deploy Firefox with LANDesk in a corporate environment.

Firefox 3.0.4. Doesn't matter if I used the self-extracting installer or extract first, the same issue occurs.

I am testing this now. Here is my .INI file:


The CloseAppNoPrompt works.

If Firefox is running and it has to be closed, I am getting a shortcut on the desktop.

If Firefox is not running, the ICON is correctly NOT added.

I guess I will have to delete it using my batch file. Here is my walk-thru:

/S switch not working with 3.5 installer

I have noticed that my script to deploy Firefox with the /S switch is still opening the install wizard. I have found that the -ms switch still works, but is considered depreciated. Any suggestions?

If you use the INI option it will automatically install in silent mode as long as the file exists and can be read by the account running the install. It is also necessary for the account to have administrative privileges. Filed bug 506867 Robert Strong 07:24, 28 July 2009 (UTC)

/D switch working with 3.5 installer running XP32 & XP64

It seems that one has to omit quotation marks even when using paths with spaces. For special characters a 'for' statement solves the problem:

for %i in ("C:\black & white") do "Firefox Setup 3.5.exe" -ms /D=%~i

Help > About > Version number doesn't change

When I update with the command line, specifying an ini file, the install goes ok - silent and lovely, but it doesn't update the Firefox version number in About.

As of now the latest version is Firefox 3.6. I take a machine that has 3.5 installed. I run the installer & it seems to work. Now, I launch Firefox & go to Help > About. The version number still says 3.5. The user string shown on the same window says: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)"

Also, if I do Help > Check for updates, then Firefox returns that it is up to date.

I the same results on Firefox 3.0.18 - everything went well, but the help about page shows the version unchanged, at 3.0.18, yet the user-agent and everything else shows the browser to be at 3.6.

If the silent install did in fact complete successfully then this would be caused by something outside of the installer. You can try running the installer without it being silent to see if it updated the version properly and if it did then the silent install likely didn't complete successfully. If it doesn't then it is likely a pref in your profile overriding the value displayed. Before you hunt down the pref you can verify this is the case by running with a new profile and checking the version value. : Robert Strong 21:00, 4 March 2010 (UTC)

I created a new blank profile, and the setting remains the same. Everything says that it's Firefox 3.6, except the Help > About screen.

  • User agent string is 3.6
  • HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox: Key 'CurrentVersion' shows 3.6
  • Help > Update, shows no new updates available

When I run a normal install of 3.6, it all goes ok, and yet the behaviour of the Help > About remains resolutely incorrect. I've replicated this on several machines running various versions of Firefox (hence my desire to script-force an update :) )

I'm installing it with a batch file: "\\server\Software\Firefox\Firefox Setup 3.6\setup.exe" /INI="\\server\Software\Firefox\Firefox Setup 3.6\config.ini"

Using the config.ini file: [Install] QuickLaunchShortcut=false DesktopShortcut=false

Uploaded image to show what I'm talking about.

I'd be grateful to see if anyone can replicate this...?

The installer literally just copies files so it has nothing to do with this problem and if it is successfully completing then it isn't due to the old version being present. I suggest you take the problem to either the <a href="">support forums</a> or <a href="">mozillazine</a>. : Robert Strong 00:05, 5 March 2010 (UTC)

Definitive Install Command List

Can anoyone out there (at Mozilla I hope) let the good people know all the configuration ini commands

so far I have these:


EnableProfileMigrator is not managed by the installer. The available settings for the ini file are listed under the 'Configuration ini file syntax' on the page. I'll make a note on the page that they are the values that are available. : Robert Strong 01:25, 29 March 2010 (UTC)

Video Example of deploying Mozilla Firefox

Using the /INI command line argument (described above) I've been able to silently deploy Firefox to windows computers. Here is a video showing how to do a deployment. Deploy Firefox It's important to remember that the /INI argument expects the full path (relative paths will not work). I keep my Firefox.ini file on an accessible network share.

/S Switch definitely does not work on 3.6.13

I will admit to a little frustration with the information on the preceding page. Its bad enough there isn't an MSI installer to assist with the bulk group policy deployment of Firefox to a Windows domain, but to have out-of date information on the command line installation switches for uninstallation of old versions and no explanation that newer versions overwrite the older versions made it a very challenging day.

For those who follow that want to do a domain installation, the contents of the script written are included, this was saved in a Computer-based startup script GPO and applied to the necessary computer OU. It does drop a file (firefox3.6.13installed.txt) on the c: drive with the time and date of installation to prevent installation every time the PC starts, change the path to suit if required...

if exist "c:\firefox3.6.13installed.txt" goto end

REM uninstall all earlier versions

REM \\server\programs\Firefox\Firefox_Setup_3.6.13.exe /S

REM Ba-bow... that don't work...

REM install latest version silently and with default options

\\server\programs\Firefox\Firefox_Setup_3.6.13.exe -ms


echo %date% >> "c:\firefox3.6.13installed.txt"

echo %time% >> "c:\firefox3.6.13installed.txt"


Confusing directions: Don't mix commands / Mix these commands?

What is meant by:

DO NOT MIX command line options from different lines below (e.g. don't mix /S with /INI, etc.)

Then the next instruction says:

Silent install (always installs into the default location. Use the "Configuration ini file" option below to set the install location and other install options)

To me, this is contradictory. Wouldn't I need the silent switch in conjunction with the /INI switch?

FirefoxSetup.exe -ms /INI=config.ini

Itismike 06:35, 4 March 2011 (PST)

Firefox /INI command-line switch does not allow spaces in folder paths.

Firefox 27 Windows 7 Using /INI switch to try and use the Installer path values.

I found that the folder name value or folder path value will not work if there are spaces in either.

When you try to do so the installer fails silently with errorlevel 0

If spaces are removed the install works and installs to the folder or path specified.

this happens even if you put single quotes or double quotes around the string. This should be fixed.