How do I configure Firefox through a script?

I'm looking to configure the following Firefox settings through a script (VBS or batch)

  • default home page
  • default search engine
  • disable auto update

Is this possible?


Solution 1:

You can do this by creating or manipulating Mozilla preferences files with your preferred scripting language.

For a list of preferences that can be set through these files, see the Mozilla Preferences and about:config documentation, although the ones that correspond to your list appear to be:-

  • browser.startup.homepage (default home page)
  • browser.search.defaultenginename (default search engine)
  • app.update.auto (enable/disable auto update)

However, depending on your environment, you might find it better to push settings through a custom add-on (see the XPI comments in the Brief Guide to Mozilla Preferences), or through GPO with FirefoxADM or similar.

Solution 2:

You can override private browser options in a file user.js in the user profiles folder. I use it often to override some options for example pipelining. Firefox needs to be restart after you have update the user.js. If the file user.js doesn't exist you must create one.