Jump to content

Firefox 3.0.6 AdvancedINF Install


Acheron

Recommended Posts

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.AddReg
CopyFiles = Firefox.CopyFiles,GrePrefs.CopyFiles
RunPostSetupCommands = Firefox.Install:1
UpdateInis = override.ini

[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.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 folder
HKCU,"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.js

pref("general.config.obscure_value", 0);
pref("general.config.filename", "firefox.cfg");

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);

//hide welcome message
defaultPref("browser.startup.homepage_override.mstone", "rv:1.9.0.6");

//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);
defaultPref("extensions.adblockplus.currentVersion", "1.0.1");

//customizegoogle
defaultPref("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 statusbar
defaultPref("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");

//flashgot
defaultPref("flashgot.version", "1.1.7.8");

Defaults\prefs.js

user_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 by Acheron
Link to comment
Share on other sites

  • 2 weeks later...

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 by Acheron
Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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 :thumbup

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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.html

The variable U_SHELL_FOLDERS_PERSONAL should indeed point to the My documents folder.

Link to comment
Share on other sites

I installed firefox from a batch file with this command:

rundll32.exe advpack.dll,LaunchINFSection Install.inf, DefaultInstall

Nice and easy with all settings. Thanks Acheron :thumbup

Edited by radix
Link to comment
Share on other sites

  • 2 weeks later...

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.js
LoadSourceFile failed
failed: 8

and 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 profiles

Sorry my poor english

Link to comment
Share on other sites

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.js
LoadSourceFile failed
failed: 8

and after ask me for download update complete (9.0 Mb) but this delete the all.js with this changes

losing my configuration when create new profiles

After 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.

Link to comment
Share on other sites

Thanks it works for me.

You must correct this:

[DestinationDirs]
;Firefox install dir
Firefox.CopyFiles = 16422,"Mozilla Firefox"
GrePref.CopyFiles = 16422,"Mozilla Firefox\grepref" ----------here

for this:

[DestinationDirs]
;Firefox install dir
Firefox.CopyFiles = 16422,"Mozilla Firefox"
GrePref.CopyFiles = 16422,"Mozilla Firefox\greprefs" ----------for this

"s" at end.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...