Silent install .xpi extensions only to current user?

User Help for Mozilla Firefox
Locked
User avatar
KenAlcock
Posts: 14
Joined: May 19th, 2009, 12:46 pm

Silent install .xpi extensions only to current user?

Post by KenAlcock »

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!"
User avatar
Frank Lion
Posts: 21177
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: Silent install .xpi extensions only to current user?

Post by Frank Lion »

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. :)
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
Bluefang
Posts: 7857
Joined: August 10th, 2005, 2:55 pm
Location: Vermont
Contact:

Re: Silent install .xpi extensions only to current user?

Post by Bluefang »

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...
User avatar
KenAlcock
Posts: 14
Joined: May 19th, 2009, 12:46 pm

Re: Silent install .xpi extensions only to current user?

Post by KenAlcock »

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!"
User avatar
Bluefang
Posts: 7857
Joined: August 10th, 2005, 2:55 pm
Location: Vermont
Contact:

Re: Silent install .xpi extensions only to current user?

Post by Bluefang »

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...
User avatar
KenAlcock
Posts: 14
Joined: May 19th, 2009, 12:46 pm

Re: Silent install .xpi extensions only to current user?

Post by KenAlcock »

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

Re: Silent install .xpi extensions only to current user?

Post by milimu »

Any idea how to do this in FF5?
User avatar
LIMPET235
Moderator
Posts: 39956
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Re: Silent install .xpi extensions only to current user?

Post by LIMPET235 »

Please start a new thread stating your problem Thanks.
Locking this oldie.
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.

(Always choose the "Custom" Install.)
Locked