MozillaZine

Silent install .xpi extensions only to current user?

User Help for Mozilla Firefox
KenAlcock

User avatar
 
Posts: 14
Joined: May 19th, 2009, 12:46 pm

Post Posted May 21st, 2009, 9:15 am

scratch (in another thread) wrote:as of 1.1, you will simply be able to copy extensions to your profile folder and they will be automatically installed silently.


Is this technique still valid? Can someone please point to some documentation, or elaborate here with more details, on how to do this? Specifically, to which folder or subfolder should the files be copied, and are we talking about .xpi files or something else?

I would like to create an NT Command Script (.cmd) to install several .xpi extension files, the goal being to install the extensions silently and unattended and only for the current user, while leaving all other user's Firefox profiles unaffected.

If would be great if Firefox had a command line option like -install-extension, which would work similar to -install-global-extension, but only for the current Firefox profile for the currently logged in Windows user account.
Kenneth R. Alcock
"I'm still looking for that damned <Any> key!"

Frank Lion

User avatar
 
Posts: 17433
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist... United Kingdom

Post Posted May 21st, 2009, 9:59 am

You have a couple of techniques you could look into here. One is 'multi-package-installs', this is a single extension .xpi that contains other .xpis or .jars (themes) within it. Therefore, the user 'installs' just once, but can get a whole package of them installed, all at once. So ...you could have an Install link to this somewhere, web or local.

The other method, which is cruder, is to just delete extensions .rdf/.ini/cache from existing profile with Firefox closed and paste into the profile the entire extensions folder (containing the required extensions). On restart, this lot will be installed - this is a technique we use for quickly migrating over a large number of extensions/themes from one profile to another.

No idea about .cmd stuff for this, though.

Anyway, food for thought. :)
Metal Lion latest Firefox Themes -Tiger SP, Tiger, Graphite, Australis
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

Bluefang

User avatar
 
Posts: 7846
Joined: August 10th, 2005, 2:55 pm
Location: Vermont

Post Posted May 21st, 2009, 11:01 am

If you drop the XPI file in to the profile extensions folder, it will be installed the next time the browser starts.
There have always been ghosts in the machine... random segments of code that have grouped together to form unexpected protocols. Unanticipated, these free radicals engender questions of free will, creativity, and even the nature of what we might call the soul...

KenAlcock

User avatar
 
Posts: 14
Joined: May 19th, 2009, 12:46 pm

Post Posted May 21st, 2009, 5:28 pm

First, thank you both for posting your ideas.

I have no trouble writing scripts. I just need a script-able technique. A script could easily loop through and install (or just copy) umpteen .xpi files from a given folder in rapid succession (but I want it silent and unattended). So maintaining the installation library would be as simple copying all desired .xpi files to an install folder the script will look in. And when an individual extension is update to a new version, no problem—delete the old .xpi file and copy the new one in. To this end, the command below is useful, but only when installing an extension for all Windows user accounts on the PC:

Code: Select all
Firefox.exe -install-global-extension "FilePath\FileName.xpi"


This installs extensions globally to "%ProgramFiles%\Mozilla FireFox\Extensions". And as each different Windows user account logs on after the extensions are installed (and launches Firefox), that user account's Firefox profile inherits all newly-installed, globally-installed extensions. I actually plan on installing some extensions globally, but I want to script many as per-user installations (but again silently and unattended).

By contrast, extensions installed per-user reside under that Windows User account, under "%APPDATA%\Mozilla\Extensions". One advantage to installing here, is that Grandma (on her Windows user account) no longer has to worry about clicking on the Chrome Edit Plus button (that I want installed for me) by-mistake and getting herself into trouble. So by installing some extensions per-user, on some select user accounts, it leaves the default Firefox installation (under "%ProgramFiles%\Mozilla FireFox\Extensions") much more simple for other Windows user accounts sharing the same PC.

NOTE: For what I'm try to do here, different Firefox user profiles under the same Windows user account never come into play.

Frank Lion wrote:You have a couple of techniques you could look into here. One is 'multi-package-installs'...


I had already downloaded CLEO to look at. I haven't played with it much yet. And while the multi-extension.xpi approach may simplify some things, I feel it has some minor drawbacks:
  1. The resulting .xpi must still be installed. So while this technique does simplify things to a single package, it alone does not help make installation silent and unattended.
  2. IMO, this technique also introduces a new layer of increased maintenance—maintaining the multi-extension.xpi package. Whenever an individual extension is updated, the multi-extension.xpi must be repackaged.

Bluefang wrote:If you drop the XPI file in to the profile extensions folder, it will be installed the next time the browser starts.


Now,this technique I can understand; it's simple. It should really be described just like this (changing "drop" to "copy") in the help pages. (I did a search, but I could not find this information described in there at all.) I just tested this with a single extension and it works. It does have some minor drawbacks. The user will be prompted to permit installation when they next launch Firefox, and afterward they must deal with any "fireworks" each extension provides (automatically launching a web site in a new tab, opening a configuration dialog, displaying a thank-you message, et cetera). However, this user experience is not significantly different from the one after using the -install-global-extension parameter, where each user must still deal with any "fireworks" the extension provides.

Frank Lion wrote:The other method, which is cruder, is to just delete extensions .rdf/.ini/cache from existing profile with Firefox closed and paste into the profile the entire extensions folder (containing the required extensions). On restart, this lot will be installed - this is a technique we use for quickly migrating over a large number of extensions/themes from one profile to another


Q: Will deleting the .rdf and .ini files from the profile folder only affect extensions? Or will it break anything else?

Q: Do the .rdf and .ini files also store extension option settings, or just which extensions are installed?

Q: I'm assuming it's also a good idea to empty the existing extensions folder before copying in a new one?
Kenneth R. Alcock
"I'm still looking for that damned <Any> key!"

Bluefang

User avatar
 
Posts: 7846
Joined: August 10th, 2005, 2:55 pm
Location: Vermont

Post Posted May 21st, 2009, 5:46 pm

you don't need to delete any files. Even if you drop in the unpacked folders, they should be detected and added on restart.

On the other hand, AFAIK, the only way to disable the 'an extension has been installed' dialog is to delete the extensions.(cache|ini|rdf) files. They are just metadata caches so you don't lose anything important. Though I would recommended against doing this because this dialog serves as a security measure and it notifies the user that their profile has been changed.

I don't think there is much you can do about the dialogs generated by the extensions them selves. You'd probably have to pre-configure all of their settings and inject them in to the prefs.js
There have always been ghosts in the machine... random segments of code that have grouped together to form unexpected protocols. Unanticipated, these free radicals engender questions of free will, creativity, and even the nature of what we might call the soul...

KenAlcock

User avatar
 
Posts: 14
Joined: May 19th, 2009, 12:46 pm

Post Posted May 22nd, 2009, 4:07 am

Again, thanks for the posts ... good information.
Kenneth R. Alcock
"I'm still looking for that damned <Any> key!"

milimu
Guest
 

Post Posted July 24th, 2011, 8:43 am

Any idea how to do this in FF5?

LIMPET235
Moderator

User avatar
 
Posts: 34351
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted July 24th, 2011, 8:59 am

Please start a new thread stating your problem Thanks.
Locking this oldie.
Ancient Amateur Astronomer
Win-7-HP/Intel® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-30.0-36.0.1/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.5.0.
RadioYachting. Conficker Test.

Return to Firefox Support


Who is online

Users browsing this forum: Google [Bot] and 15 guests