MSFN Forum: Firefox 3.6 Advanced INF install - MSFN Forum

Jump to content


Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Firefox 3.6 Advanced INF install New method to configure firefox for all users Rate Topic: -----

#1 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 937
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 30 January 2010 - 07:32 AM

Here is an updated tutorial to install Firefox 3.6 silently using the Advanced INF installation method.

The installation script is an update for the previous posted script which worked beautifully for Firefox 3.0 and 3.5.

The main difference is the method used to install Addons. For security reasons Firefox 3.6 has removed the "-install-global-extension" command option to install addons silently. However you can still install addons for all computer users by extracting the xpi files manually into the extensions directory of the Mozilla Firefox program files directory.
However it takes a little bit more work as you have to look up each addon to find it's unique id. This id can be found by opening the xpi as a zip file and reading the install.rdf file with a text-viewer.

The Addon ID is the information inside the <em:id> section inside the main <Description about> tree. Normally this id is the first found inside the install.rdf file.

For example Firebug has the following install.rdf:

Quote

<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">

<Description about="urn:mozilla:install-manifest">
<em:id>firebug@software.joehewitt.com</em:id>
<em:version>1.5.0</em:version>
<em:type>2</em:type>

<!-- Any suitably modern toolkit application -->
<em:targetApplication>
<Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>1.9.0.11</em:minVersion>
<em:maxVersion>1.9.3.*</em:maxVersion>
</Description>
</em:targetApplication>

<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.5</em:minVersion>
<em:maxVersion>3.6.*</em:maxVersion>
</Description>
</em:targetApplication>


For extracting the xpi files during installation I use the commandline utility of 7-zip, which can be found here

Enough talk, here's my update script. 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)

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.6
"""%01%\Firefox36%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
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\{DD43485F-44CC-4452-A6C6-69356A7E33DA}"" ""%01%\Addons\autohide-1.8.0pre-fx+sm.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\coralietab@mozdev.org"" ""%01%\Addons\coral_ie_tab-1.69.20091202-fx-win.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\dictionary-switcher@design-noir.de"" ""%01%\Addons\dictionary_switcher-1.0.1-fx.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\{D4DD63FA-01E4-46a7-B6B1-EDAB7D6AD389}"" ""%01%\Addons\download_statusbar-0.9.6.7-fx.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\firebug@software.joehewitt.com"" ""%01%\Addons\firebug-1.5.0-fx.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\firecookie@janodvarko.cz"" ""%01%\Addons\firecookie-1.0.2-fx.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\{19503e42-ca3c-4c27-b1e2-9cdb2170ee34}"" ""%01%\Addons\flashgot-1.2.1.10-fx+mz+sm+tb.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\{DB2EA31C-58F5-48b7-8D60-CB0739257904}"" ""%01%\Addons\imagetweak-0.19-fx.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\{46868735-c3fa-47ce-8ce7-cce51a66aceb}"" ""%01%\Addons\oldbar-1.2-fx.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\optimizegoogle@optimizegoogle.com"" ""%01%\Addons\optimizegoogle-0.77-fx+sm.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"" ""%01%\Addons\pagerankstatus-1.0-fx.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\tineye@ideeinc.com"" ""%01%\Addons\tineye_reverse_image_search-0.7.1-fx.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\en-US@dictionaries.addons.mozilla.org"" ""%01%\Addons\united_states_english_dictionary-4.0.0-fx+tb+sm.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\{c45c406e-ab73-11d8-be73-000a95be3b12}"" ""%01%\Addons\web_developer-1.1.8-fx+sm.xpi"""
"%01%\7za.exe x -y -o""%16422%\Mozilla Firefox\extensions\nl-NL@dictionaries.addons.mozilla.org"" ""%01%\Addons\woordenboek_nederlands-2.2.0-fx+tb+sm.xpi"""
;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);

//insert new tabs at end
defaultPref("browser.tabs.insertRelatedAfterCurrent", false);

//hide welcome messages
defaultPref("browser.startup.homepage_override.mstone", "rv:1.9.2");
defaultPref("browser.rights.3.shown", true);

//coral ietab
defaultPref("coral.ietab.showprompt", false);

//optimizegoogle
defaultPref("extensions.optimizegoogle.cookies.enableDefaultPreferences", true);
defaultPref("extensions.optimizegoogle.cookies.ResultsPerPage", 50);
defaultPref("extensions.optimizegoogle.images.auto-page", true);
defaultPref("extensions.optimizegoogle.images.image-links", true);
defaultPref("extensions.optimizegoogle.images.rewrite-links", true);
defaultPref("extensions.optimizegoogle.web.auto-page", true);
defaultPref("extensions.optimizegoogle.web.counter", true);
defaultPref("extensions.optimizegoogle.web.favicons", true);
defaultPref("extensions.optimizegoogle.web.history", true);
defaultPref("extensions.optimizegoogle.web.movie-links", true);
defaultPref("extensions.optimizegoogle.web.news-links", true);
defaultPref("extensions.optimizegoogle.web.product-links", true);
defaultPref("extensions.optimizegoogle.web.search-links", true);
defaultPref("extensions.optimizegoogle.web.suggest", true);
defaultPref("extensions.optimizegoogle.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.firstRun", false);
defaultPref("downbar.function.version", "0.9.6.7");

//flashgot
defaultPref("flashgot.firstRunRedirection", false);


Defaults\prefs.js
user_pref("browser.startup.homepage", "http://www.google.com");
user_pref("browser.search.selectedEngine", "Wikipedia (Eng)");


Using Windows XP you can launch the Firefox setup during T13 using cmdlines.txt in the $OEM$ directory.

I have placed Firefox setup files into $OEM$\Install\Mozilla Firefox directory so to install Firefox using the AdvancedINF command I would add the following line to cmdlines.txt:

"rundll32.exe advpack.dll,LaunchINFSection .\Install\Mozilla Firefox\install.inf,,1"


Current limitations:
- Desktop shortcut setting in override.ini is ignored, so a desktop shortcut is created anyway.
- Some settings are overridden when user accounts are created. Setting the homepage and search engine can only from the prefs.js file.
- AdvancedINF method needs Administrator privileges on Windows Vista and newer. However I currently have no interest in switching to Windows 7 yet so I haven't worked on a solution.

This post has been edited by Acheron: 30 January 2010 - 10:19 AM



#2 User is offline   ckislam 

  • Islam Adel
  • PipPip
  • Group: Members
  • Posts: 142
  • Joined: 04-September 05
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 January 2010 - 08:18 AM

Quote

inside the main <Description about> tree. Normally this id is the first found inside the install.rdf file.

did you face any case where the id was NOT the first one?
(that would help me a lot in creating a global installer for all addons)
thanks a lot.

#3 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 937
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 30 January 2010 - 08:35 AM

Most rdf files have similar layouts. However as the xml specification doesn't specify anything about tag order I can't guarantee the id tag will come first.

#4 User is offline   ckislam 

  • Islam Adel
  • PipPip
  • Group: Members
  • Posts: 142
  • Joined: 04-September 05
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 January 2010 - 02:13 PM

assuming the first id is the correct id..
i made the following script to install Firefox addons

requirements:
(put all of them in the same folder)

1. UnZip.exe (Command line extractor) from http://www.info-zip.org
or use any other you extractor you prefer and adjust the parameters for extraction below

2. youraddon.xpi (any Firefox compatible xpi)

3. This cmd script call it install.cmd for example

@echo off
Title Firefox Addon installer by TGUP.net
echo.
Echo Installing youraddon..
IF EXIST "%temp%\youraddon\" rd /s /q "%temp%\youraddon"
MD "%temp%\youraddon\addon"
Start /B /Wait "Extracting" "UnZip.exe" -q -o "youraddon.xpi" -d "%temp%\youraddon\addon"
FOR /F "tokens=2,3 delims=^<^>=" %%i in ('FIND "em:id" "%temp%\youraddon\addon\install.rdf"') DO (IF "%%~j"=="" (SET xpi_id=%%~i&GOTO :vaivai) ELSE (SET xpi_id=%%~j&GOTO :vaivai))
:vaivai
IF NOT DEFINED xpi_id (
	ECHO.
	ECHO.
	Echo Error occured while extracting..
	ping.exe 127.0.0.1 -n 4 >NUL
	EXIT
)
rem kill firefox or get write error
tskill firefox

FOR /F %%a in ('dir /ad /b "%appdata%\Mozilla\Firefox\Profiles\*.default"') DO (
IF EXIST "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%\" rd /s /q "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%"
IF NOT EXIST "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%\" MD "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%"
FOR /F "tokens=*" %%i in ('dir /b /og "%temp%\youraddon\%xpi_id%\"') DO MOVE /Y "%temp%\youraddon\%xpi_id%\%%i" "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%\"
)

echo.
echo Installation Done!
ping.exe 127.0.0.1 -n 4 >NUL
IF EXIST "%temp%\youraddon\" rd /s /q "%temp%\youraddon"
exit


:unsure:

This post has been edited by ckislam: 02 February 2010 - 11:54 AM


#5 User is offline   flabdablet 

  • Group: Members
  • Posts: 2
  • Joined: 31-July 05

Posted 31 January 2010 - 04:20 AM

Looks like we've been working along similar lines.

I like your ^<^> trick for persuading cmd not to treat angle brackets as redirects. Where is that documented? Wherever it is, I am sure to find more tips that will save me time when I next wrestle with cmd's almost-a-parser.

This post has been edited by flabdablet: 31 January 2010 - 04:21 AM


#6 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 937
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 31 January 2010 - 06:20 AM

^ is the escape character in batch scripts. It means the following command character will be treated as a normal character. In INF scripts you have no escape character but you must double them instead. That's why you see "" in stead of a single " for commands.

#7 User is offline   strel 

  • segmentation fault
  • PipPipPipPip
  • Group: Members
  • Posts: 629
  • Joined: 24-February 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 31 January 2010 - 12:19 PM

Rob van der Woude's page is a nice one.

#8 User is offline   ckislam 

  • Islam Adel
  • PipPip
  • Group: Members
  • Posts: 142
  • Joined: 04-September 05
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 02 February 2010 - 11:56 AM

I found some different formatting in some XPIs

<em:id>{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}</em:id>


em:id="bettergmail2@ginatrapani.org"


I updated the script above to handle both cases correctly

#9 User is offline   titishor 

  • Newbie
  • Group: Members
  • Posts: 33
  • Joined: 30-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 03 February 2010 - 02:52 PM

Tested . Works 100%
Firefox 3.6 silent install :
Command line : firefox3.6.exe -ms -ira

#10 User is offline   oskingen 

  • MSFN Friend
  • PipPipPipPip
  • Group: Members
  • Posts: 613
  • Joined: 20-January 08
  • OS:none specified
  • Country: Country Flag

Posted 21 March 2010 - 08:06 PM

the link to download unzip looks broken on the website. can someone can put it avalaible for me please.

This post has been edited by hannubys: 21 March 2010 - 08:19 PM


#11 User is offline   zeeter 

  • Group: Members
  • Posts: 4
  • Joined: 17-February 10
  • OS:XP Pro x86

Posted 15 June 2010 - 03:35 PM

View Postckislam, on 30 January 2010 - 02:13 PM, said:

assuming the first id is the correct id..
i made the following script to install Firefox addons

requirements:
(put all of them in the same folder)

1. UnZip.exe (Command line extractor) from http://www.info-zip.org
or use any other you extractor you prefer and adjust the parameters for extraction below

2. youraddon.xpi (any Firefox compatible xpi)

3. This cmd script call it install.cmd for example

@echo off
Title Firefox Addon installer by TGUP.net
echo.
Echo Installing youraddon..
IF EXIST "%temp%\youraddon\" rd /s /q "%temp%\youraddon"
MD "%temp%\youraddon\addon"
Start /B /Wait "Extracting" "UnZip.exe" -q -o "youraddon.xpi" -d "%temp%\youraddon\addon"
FOR /F "tokens=2,3 delims=^<^>=" %%i in ('FIND "em:id" "%temp%\youraddon\addon\install.rdf"') DO (IF "%%~j"=="" (SET xpi_id=%%~i&GOTO :vaivai) ELSE (SET xpi_id=%%~j&GOTO :vaivai))
:vaivai
IF NOT DEFINED xpi_id (
	ECHO.
	ECHO.
	Echo Error occured while extracting..
	ping.exe 127.0.0.1 -n 4 >NUL
	EXIT
)
rem kill firefox or get write error
tskill firefox

FOR /F %%a in ('dir /ad /b "%appdata%\Mozilla\Firefox\Profiles\*.default"') DO (
IF EXIST "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%\" rd /s /q "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%"
IF NOT EXIST "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%\" MD "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%"
FOR /F "tokens=*" %%i in ('dir /b /og "%temp%\youraddon\%xpi_id%\"') DO MOVE /Y "%temp%\youraddon\%xpi_id%\%%i" "%appdata%\Mozilla\Firefox\Profiles\%%a\extensions\%xpi_id%\"
)

echo.
echo Installation Done!
ping.exe 127.0.0.1 -n 4 >NUL
IF EXIST "%temp%\youraddon\" rd /s /q "%temp%\youraddon"
exit


:unsure:


Just tried this and it's not working for me. The prompt flashes and then quickly closes. I closed firefox before running this. I name the files what you have here and put them all in the same directory. Using this on firefox 3.6.3

Any ideas?

This post has been edited by zeeter: 15 June 2010 - 03:36 PM


#12 User is offline   zeeter 

  • Group: Members
  • Posts: 4
  • Joined: 17-February 10
  • OS:XP Pro x86

Posted 16 June 2010 - 08:39 AM

I think I was able to create a silent installer after examining one of yours ckislam and using CreateurSFXv2 :)

So I should be ok for now.


Thanks for the good info and script.

#13 User is online   DosProbie 

  • Member
  • Group: Supreme Sponsor
  • Posts: 202
  • Joined: 16-October 12
  • OS:Windows 8 x64
  • Country: Country Flag

Posted 27 October 2012 - 11:23 AM

Here is a undated Addon Installer to Install Multiple Firefox Addon's .. Tested and Working 100% on Windows Vista, Win 7 and Win 8 32-64bit.
also has optional installer for your user.js file as well. Say Thanks if you find this useful... DosProbile ö¿ö

Attached File(s)


This post has been edited by DosProbie: 14 March 2013 - 08:04 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy