Acheron Posted June 17, 2008 Posted June 17, 2008 (edited) I didn't see anything about Firefox for the last couple of weeks, so I start a new thread for this wonderful browser.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.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[Version]Signature="$Windows NT$"[DefaultInstall]AddReg = Firefox.AddRegCopyFiles = Firefox.CopyFiles,GrePrefs.CopyFilesRunPostSetupCommands = Firefox.Install:1UpdateInis = override.ini[DestinationDirs];Firefox install dirFirefox.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.6"""%01%\Firefox306%LANG_ID%.exe"" /INI=%16422%\Mozilla Firefox\override.ini";Copy default profile folder"xcopy /i /e /y ""%01%\Defaults"" ""%16422%\Mozilla Firefox\defaults\profile""";Create download folder in My documents"cmd /c md ""%16389%\Downloads""";Create default profile"""%16422%\Mozilla Firefox\Firefox.exe"" -CreateProfile default";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 start ""Installing Firefox addons"" /wait ""%%programfiles%%\Mozilla Firefox\firefox.exe"" -install-global-extension ""%%e""";Install themes"cmd /c for %%e in (""%01%\Themes\*.jar"") do start ""Installing Firefox themes"" /wait ""%%programfiles%%\Mozilla Firefox\firefox.exe"" -install-global-theme ""%%e""";Set Firefox as default browser"""%16422%\Mozilla Firefox\firefox.exe"" -setDefaultBrowser -silent"[Firefox.AddReg];Add Environment variable for Personal folderHKCU,"Environment","Personal",0x00020000,"%U_SHELL_FOLDERS_PERSONAL%"[override.ini]"%16422%\Mozilla Firefox\override.ini","Install",,"CloseAppNoPrompt=true""%16422%\Mozilla Firefox\override.ini","Install",,"DesktopShortcut=false""%16422%\Mozilla Firefox\override.ini","XRE",,"EnableProfileMigrator=false"[Strings]U_SHELL_FOLDERS_PERSONAL="%USERPROFILE%\My Documents"[Strings.0413]LANG_ID="nl"U_SHELL_FOLDERS_PERSONAL="%USERPROFILE%\Mijn documenten"_config.jspref("general.config.obscure_value", 0);pref("general.config.filename", "firefox.cfg");firefox.cfg//general settingsdefaultPref("general.smoothScroll", true);defaultPref("general.warnOnAboutConfig", false);//set default download directoryvar 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 messagedefaultPref("browser.startup.homepage_override.mstone", "rv:1.9.0.6");//use classic skindefaultPref("general.skins.selectedSkin", "Firefox3DefaultVista");//adblock plusdefaultPref("extensions.adblockplus.checkedadblockinstalled", true);defaultPref("extensions.adblockplus.checkedtoolbar", true);defaultPref("extensions.adblockplus.showinstatusbar", true);defaultPref("extensions.adblockplus.showintoolbar", false);defaultPref("extensions.adblockplus.showsubscriptions", false);defaultPref("extensions.adblockplus.currentVersion", "1.0.1");//customizegoogledefaultPref("extensions.customizegoogle.cookies.enableDefaultPreferences", true);defaultPref("extensions.customizegoogle.cookies.ResultsPerPage", 50);defaultPref("extensions.customizegoogle.images.auto-page", true);defaultPref("extensions.customizegoogle.images.image-links", true);defaultPref("extensions.customizegoogle.images.rewrite-links", true);defaultPref("extensions.customizegoogle.web.auto-page", true);defaultPref("extensions.customizegoogle.web.counter", true);defaultPref("extensions.customizegoogle.web.favicons", true);defaultPref("extensions.customizegoogle.web.history", true);defaultPref("extensions.customizegoogle.web.movie-links", true);defaultPref("extensions.customizegoogle.web.news-links", true);defaultPref("extensions.customizegoogle.web.product-links", true);defaultPref("extensions.customizegoogle.web.search-links", true);defaultPref("extensions.customizegoogle.web.suggest", true);defaultPref("extensions.customizegoogle.web.weather-links", true);//download statusbardefaultPref("browser.download.manager.alertOnEXEOpen", false);defaultPref("browser.download.manager.showAlertOnComplete", false);defaultPref("browser.download.manager.showWhenStarting", false);defaultPref("downbar.function.donateTextInterval", "1233792563312");defaultPref("downbar.function.firstRun", false);defaultPref("downbar.function.version", "0.9.6.4");//flashgotdefaultPref("flashgot.version", "1.1.7.8");Defaults\prefs.jsuser_pref("browser.startup.homepage", "http://www.google.com");user_pref("browser.search.selectedEngine", "Wikipedia (Eng)");To install Firefox using the AdvancedINF command you simply add the following command to your unattended install script:"rundll32.exe advpack.dll,LaunchINFSection .\PATH\TO\FIREFOX\install.inf,,1" Edited February 26, 2009 by Acheron
Acheron Posted June 30, 2008 Author Posted June 30, 2008 (edited) Known issues:When Firefox is set the default browser using the -setDefaultBrowser argument a desktop shortcut is created, although no desktop shortcut was specified during install. Remove the shortcut afterwards using a cleanup script. Edited February 26, 2009 by Acheron
radix Posted July 1, 2008 Posted July 1, 2008 I'm a bit disappointed that I didn't get any feedback about creating a unattended configurable Firefox 3.0 install script.Your previous scripts works fine for me (with some changes like home page etc.). I will keep the first version.
Acheron Posted July 1, 2008 Author Posted July 1, 2008 I'm a bit disappointed that I didn't get any feedback about creating a unattended configurable Firefox 3.0 install script.Your previous scripts works fine for me (with some changes like home page etc.). I will keep the first version. Thanks, but this new script works even better. Now script doesn't need AutoIt anymore and also removed additional batch files
ricktendo Posted July 1, 2008 Posted July 1, 2008 I see you have done allot of reading of INF PDF tutorials BTW I where can I find the CMD because I wanna try to do it all via config.txt and 7zip sfx
`Felix` Posted July 8, 2008 Posted July 8, 2008 firefox.cfg//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); //download statusbar defaultPref("browser.download.manager.showAlertOnComplete", false); defaultPref("browser.download.manager.showWhenStarting", false); defaultPref("downbar.function.firstRun", false); defaultPref("downbar.function.version", "0.9.6.3"); defaultPref("downbar.function.donateTextInterval", "1214154639539"); //adblock plus defaultPref("extensions.adblockplus.checkedadblockinstalled", true); defaultPref("extensions.adblockplus.showinstatusbar", true); defaultPref("extensions.adblockplus.showintoolbar", false); defaultPref("extensions.adblockplus.showsubscriptions", false); //hide welcome message defaultPref("browser.startup.homepage_override.mstone", "rv:1.9"); //don't notify about installed extensions defaultPref("extensions.update.notifyUser", false); //use classic skin defaultPref("general.skins.selectedSkin", "Firefox3DefaultVista");Sorry for what maybe a dumb question - Where do you get this information from?Also i assume that [Strings] U_SHELL_FOLDERS_PERSONAL="%USERPROFILE%\Mijn documenten"Is "%USERPROFILE%\My Documents"
Acheron Posted July 8, 2008 Author Posted July 8, 2008 Felix, you can get these settings from the about:config window. I just included some config options I use, but you can modify it for your own needs.I got the information from the following site: http://mit.edu/~firefox/www/maintainers/autoconfig.htmlThe variable U_SHELL_FOLDERS_PERSONAL should indeed point to the My documents folder.
radix Posted July 8, 2008 Posted July 8, 2008 (edited) I installed firefox from a batch file with this command:rundll32.exe advpack.dll,LaunchINFSection Install.inf, DefaultInstallNice and easy with all settings. Thanks Acheron Edited July 8, 2008 by radix
Acheron Posted July 17, 2008 Author Posted July 17, 2008 Updated to Firefox 3.0.1. I have renamed the folder structure to add a Plugins folder to support installing the WMP for Firefox plugin.
ippsatsi Posted July 19, 2008 Posted July 19, 2008 Hi, when i use your install script with firefox 3.0 and after update to firefox 3.0.1 , this fail, and checking files of firefox "last-update.log" show me this error :PREPARE PATCH grepprefs/all.jsLoadSourceFile failedfailed: 8and after ask me for download update complete (9.0 Mb) but this delete the all.js with this changes[systemPrefs];Configure default settings for all users"%16422%\Mozilla Firefox\greprefs\all.js",,,"pref(""general.config.obscure_value"", 0);""%16422%\Mozilla Firefox\greprefs\all.js",,,"pref(""general.config.filename"", ""firefox.cfg"");"losing my configuration when create new profilesSorry my poor english
Acheron Posted July 19, 2008 Author Posted July 19, 2008 Hi, when i use your install script with firefox 3.0 and after update to firefox 3.0.1 , this fail, and checking files of firefox "last-update.log" show me this error :PREPARE PATCH grepprefs/all.jsLoadSourceFile failedfailed: 8and after ask me for download update complete (9.0 Mb) but this delete the all.js with this changeslosing my configuration when create new profilesAfter testing on my running system I see indeed any changes to all.js are overwritten. Also the UpdateInis method makes a mess of any js file when running the installation script multiple times, as no ini section was specified.I have updated the first post with new instructions. The config file is now enabled by a separate js file _config.js.
ippsatsi Posted July 20, 2008 Posted July 20, 2008 Thanks it works for me.You must correct this:[DestinationDirs];Firefox install dirFirefox.CopyFiles = 16422,"Mozilla Firefox"GrePref.CopyFiles = 16422,"Mozilla Firefox\grepref" ----------herefor this:[DestinationDirs];Firefox install dirFirefox.CopyFiles = 16422,"Mozilla Firefox"GrePref.CopyFiles = 16422,"Mozilla Firefox\greprefs" ----------for this"s" at end.
Acheron Posted July 20, 2008 Author Posted July 20, 2008 You are right, fixed now. Well the script does look a bit complicated, once you have configured your settings it is very easy to maintain.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now