The settings specified in firefox.cfg will be loaded as default settings. I show you mine, but you can store any firefox setting in this file and it will be the default setting.
The unattended method described below also works with Firefox 2.0.
In the script dir I have the following folders:
Defaults, contains files copied to the Profile directory (bookmarks file for example is places.sqlite)
Components, contains XPCOM components (xpt extension)
Addons, contains addons (xpi extension)
Plugins, contains any plugins (WMP firefox plugin)
Themes, contains any theme file (jar extension)
Install.inf
CODE
[Version]
Signature="$Windows NT$"
[DefaultInstall]
RunPreSetupCommands = Firefox.Install:1
RunPostSetupCommands = Firefox.Config:1
CopyFiles = Firefox.CopyFiles,GrePrefs.CopyFiles
AddReg = Firefox.AddReg
UpdateInis = SkipIEMigration
[DestinationDirs]
;Firefox install dir
Firefox.CopyFiles = 16422,"Mozilla Firefox"
GrePrefs.CopyFiles = 16422,"Mozilla Firefox\greprefs"
[Firefox.CopyFiles]
;General config file
"firefox.cfg"
[GrePrefs.CopyFiles]
;Enable general config file
"_config.js"
[Firefox.Install]
;Mozilla Firefox 3.0.1
"""%01%\Firefox301nl.exe"" /S"
;Adobe Flash Player 9.0.124.0 plugin
"msiexec /i ""%01%\flashplayer90124_other.msi"" /qn ALLUSERS=1"
[Firefox.Config]
;Create download folder in My documents
"cmd /c md ""%16389%\Downloads"""
;Copy default profile folder
"xcopy /e /y ""%01%\Defaults"" ""%16422%\Mozilla Firefox\defaults\profile"""
;Copy components
"cmd /c copy /y ""%01%\Components"" ""%16422%\Mozilla Firefox\Components"""
;Copy plugins
"cmd /c copy /y ""%01%\Plugins"" ""%16422%\Mozilla Firefox\Plugins"""
;Install addons
"cmd /c for %%%%e in (""%01%\Addons\*.xpi"") do ""%16422%\Mozilla Firefox\firefox.exe"" -install-global-extension ""%%%%e"""
;Install themes
"cmd /c for %%%%e in (""%01%\Themes\*.jar"") do ""%16422%\Mozilla Firefox\firefox.exe"" -install-global-theme ""%%%%e"""
;Set Firefox as default browser
"""%16422%\Mozilla Firefox\firefox.exe"" -silent -setDefaultBrowser"
[Firefox.AddReg]
;Add Environment variable to Personal folder
HKCU,"Environment","Personal",0x00020000,"%U_SHELL_FOLDERS_PERSONAL%"
[SkipIEMigration]
"%16422%\Mozilla Firefox\override.ini","XRE",,"EnableProfileMigrator=false"
[Strings]
U_SHELL_FOLDERS_PERSONAL="%USERPROFILE%\My Documents"
Signature="$Windows NT$"
[DefaultInstall]
RunPreSetupCommands = Firefox.Install:1
RunPostSetupCommands = Firefox.Config:1
CopyFiles = Firefox.CopyFiles,GrePrefs.CopyFiles
AddReg = Firefox.AddReg
UpdateInis = SkipIEMigration
[DestinationDirs]
;Firefox install dir
Firefox.CopyFiles = 16422,"Mozilla Firefox"
GrePrefs.CopyFiles = 16422,"Mozilla Firefox\greprefs"
[Firefox.CopyFiles]
;General config file
"firefox.cfg"
[GrePrefs.CopyFiles]
;Enable general config file
"_config.js"
[Firefox.Install]
;Mozilla Firefox 3.0.1
"""%01%\Firefox301nl.exe"" /S"
;Adobe Flash Player 9.0.124.0 plugin
"msiexec /i ""%01%\flashplayer90124_other.msi"" /qn ALLUSERS=1"
[Firefox.Config]
;Create download folder in My documents
"cmd /c md ""%16389%\Downloads"""
;Copy default profile folder
"xcopy /e /y ""%01%\Defaults"" ""%16422%\Mozilla Firefox\defaults\profile"""
;Copy components
"cmd /c copy /y ""%01%\Components"" ""%16422%\Mozilla Firefox\Components"""
;Copy plugins
"cmd /c copy /y ""%01%\Plugins"" ""%16422%\Mozilla Firefox\Plugins"""
;Install addons
"cmd /c for %%%%e in (""%01%\Addons\*.xpi"") do ""%16422%\Mozilla Firefox\firefox.exe"" -install-global-extension ""%%%%e"""
;Install themes
"cmd /c for %%%%e in (""%01%\Themes\*.jar"") do ""%16422%\Mozilla Firefox\firefox.exe"" -install-global-theme ""%%%%e"""
;Set Firefox as default browser
"""%16422%\Mozilla Firefox\firefox.exe"" -silent -setDefaultBrowser"
[Firefox.AddReg]
;Add Environment variable to Personal folder
HKCU,"Environment","Personal",0x00020000,"%U_SHELL_FOLDERS_PERSONAL%"
[SkipIEMigration]
"%16422%\Mozilla Firefox\override.ini","XRE",,"EnableProfileMigrator=false"
[Strings]
U_SHELL_FOLDERS_PERSONAL="%USERPROFILE%\My Documents"
_config.js
CODE
pref("general.config.obscure_value", 0);
pref("general.config.filename", "firefox.cfg");
pref("general.config.filename", "firefox.cfg");
firefox.cfg
CODE
//general settings
defaultPref("general.smoothScroll", true);
defaultPref("general.warnOnAboutConfig", false);
//set default download directory
var download_dir = getenv("PERSONAL") + "\\Downloads";
defaultPref("browser.download.defaultFolder", download_dir);
defaultPref("browser.download.dir", download_dir);
defaultPref("browser.download.downloadDir", download_dir);
defaultPref("browser.download.folderList", 2);
//hide welcome message
defaultPref("browser.startup.homepage_override.mstone", "rv:1.9.0.1");
//don't notify about installed extensions
defaultPref("extensions.update.notifyUser", false);
//use classic skin
defaultPref("general.skins.selectedSkin", "Firefox3DefaultVista");
//adblock plus
defaultPref("extensions.adblockplus.checkedadblockinstalled", true);
defaultPref("extensions.adblockplus.checkedtoolbar", true);
defaultPref("extensions.adblockplus.showinstatusbar", true);
defaultPref("extensions.adblockplus.showintoolbar", false);
defaultPref("extensions.adblockplus.showsubscriptions", false);
//download statusbar
defaultPref("browser.download.manager.alertOnEXEOpen", false);
defaultPref("browser.download.manager.showAlertOnComplete", false);
defaultPref("browser.download.manager.showWhenStarting", false);
defaultPref("downbar.function.donateTextInterval", "1214154639539");
defaultPref("downbar.function.firstRun", false);
defaultPref("downbar.function.version", "0.9.6.3");
//flashgot
defaultPref("flashgot.version", "1.0.4.5");
//video download helper
defaultPref("dwhelper.first-time", false);
defaultPref("dwhelper.last-version", "3.1.1");
defaultPref("general.smoothScroll", true);
defaultPref("general.warnOnAboutConfig", false);
//set default download directory
var download_dir = getenv("PERSONAL") + "\\Downloads";
defaultPref("browser.download.defaultFolder", download_dir);
defaultPref("browser.download.dir", download_dir);
defaultPref("browser.download.downloadDir", download_dir);
defaultPref("browser.download.folderList", 2);
//hide welcome message
defaultPref("browser.startup.homepage_override.mstone", "rv:1.9.0.1");
//don't notify about installed extensions
defaultPref("extensions.update.notifyUser", false);
//use classic skin
defaultPref("general.skins.selectedSkin", "Firefox3DefaultVista");
//adblock plus
defaultPref("extensions.adblockplus.checkedadblockinstalled", true);
defaultPref("extensions.adblockplus.checkedtoolbar", true);
defaultPref("extensions.adblockplus.showinstatusbar", true);
defaultPref("extensions.adblockplus.showintoolbar", false);
defaultPref("extensions.adblockplus.showsubscriptions", false);
//download statusbar
defaultPref("browser.download.manager.alertOnEXEOpen", false);
defaultPref("browser.download.manager.showAlertOnComplete", false);
defaultPref("browser.download.manager.showWhenStarting", false);
defaultPref("downbar.function.donateTextInterval", "1214154639539");
defaultPref("downbar.function.firstRun", false);
defaultPref("downbar.function.version", "0.9.6.3");
//flashgot
defaultPref("flashgot.version", "1.0.4.5");
//video download helper
defaultPref("dwhelper.first-time", false);
defaultPref("dwhelper.last-version", "3.1.1");
Defaults\prefs.js
CODE
user_pref("browser.startup.homepage", "http://www.google.com/ncr");
user_pref("browser.search.selectedEngine", "Wikipedia (Eng)");
user_pref("browser.search.selectedEngine", "Wikipedia (Eng)");
