MozillaZine

-install-global-extension missing from Firefox 3.6

Discussion of general topics about Mozilla Firefox
flabdablet

User avatar
 
Posts: 10
Joined: July 29th, 2004, 6:14 am

Post Posted January 29th, 2010, 8:41 pm

I'm a school netadmin, and I found to my surprise and dismay that after upgrading the school's Windows PCs to Firefox 3.6 I could no longer install extensions computer-wide with firefox.exe -install-global-extension something.xpi.

I was even more surprised to find that this is a feature, not a bug.

Rather than continue adding noise to bug 396510 or provoke further poo-flinging over in Firefox Builds, I'm opening this thread in the hope that one of you lovely people will be able to tell me how to achieve, in the brave new world of Gecko >= 1.9.2, exactly what I used to be able to using -install-global-extension.

What is current best practice for performing silent, scripted, administrative installation of selected Firefox extensions for all users of a given computer, without requiring the first user who runs Firefox after the installation to have admin rights, and without interrupting users' workflow with post-installation popups containing choices they could possibly get wrong?

Thanks in advance - Stephen

Bluefang

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

Post Posted January 29th, 2010, 9:41 pm

Starting a new topic isn't going to get you any new information that isn't already in the references you linked.
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...

flabdablet

User avatar
 
Posts: 10
Joined: July 29th, 2004, 6:14 am

Post Posted January 29th, 2010, 10:14 pm

Are you saying that because (a) new topics here are no more visible than old Builds topics (b) starting new topics instead of continuing old ones is frowned upon or (c) you know for sure that no convenient replacement for -install-global-extension currently exists?

In other words, should I (a) keep waiting for useful responses everywhere (b) go bump the Builds thread or (c) focus on resolving this issue unassisted?

flabdablet

User avatar
 
Posts: 10
Joined: July 29th, 2004, 6:14 am

Post Posted January 29th, 2010, 10:51 pm

Huh. Maybe I should (d) RTFM. :oops:

For the benefit of other people whose search skills have failed the same way mine apparently did, here is the Mozilla documentation on silent installation of global extensions for Gecko 1.9+.

Since I have already tried that method without success, it appears I have some debugging to do. Sorry if I've wasted anybody else's time.
Last edited by flabdablet on January 30th, 2010, 2:46 am, edited 2 times in total.

flabdablet

User avatar
 
Posts: 10
Joined: July 29th, 2004, 6:14 am

Post Posted January 30th, 2010, 2:25 am

So, the failure was all my fault, and the documented extension installation procedures work just fine.

I am using 7-Zip to unzip the XPI packages, and my script was carelessly using 7z.exe e -yo"folder" package.xpi which flattens the zip file's folder hierarchy on expansion instead of 7z.exe x -yo"folder" package.xpi which preserves it.

I guess it is a little optimistic to expect an extension to work properly with a totally empty Chrome folder. #-o

flabdablet

User avatar
 
Posts: 10
Joined: July 29th, 2004, 6:14 am

Post Posted January 31st, 2010, 2:18 am

For the possible benefit of other long suffering netadmins, here's a typically horrid Windows cmd script. I'm not guaranteeing it will save you more time than it wastes, but the :mozextn subroutine it demonstrates is what I'm currently using to deploy Mozilla extensions at the school, and it works OK for now.

In fact it's marginally quicker than the old -install-global-extension method, and because it doesn't involve invoking Firefox, I no longer need to wedge a pre-built Firefox profile into "Documents and Settings\Default User\Application Data\Mozilla\Firefox" to stop the first-run wizard messing up my Windows startup script (with no profile in place, Firefox used to ignore -install-global-extension and do the "Import settings" dance instead).

I'm subscribed to this thread in case anybody needs help.

ckislam

User avatar
 
Posts: 4
Joined: February 4th, 2007, 10:54 am

Post Posted January 31st, 2010, 3:27 am


WildcatRay

User avatar
 
Posts: 6965
Joined: October 18th, 2007, 7:03 pm
Location: Columbus, OH

Post Posted January 31st, 2010, 6:12 am

Both of you have provided interesting solutions.

My solution, which I did well before -install-global was even dropped was to make "Sendtos" directed to my Firefox profile extensions folders and my Thunderbird Program Folders extensions folder which is where I install my Thunderbird extensions globally. Also, with the Save Link in Folder extension, I am now able to save the add-ons to an archive as well as to the folder where they will be installed/updated.
Ray

flabdablet

User avatar
 
Posts: 10
Joined: July 29th, 2004, 6:14 am

Post Posted February 1st, 2010, 8:10 pm

While I'm at it, here's a script to set Firefox as the default browser by updating the necessary registry keys directly. This is suitable for calling from a user logon script. It runs faster than using -setDefaultBrowser, doesn't litter desktop and quicklaunch bar with possibly unwanted shortcuts, and causes no mysterious delays and pop-ups from extension first-runs (Zotero, I'm looking at you). Enjoy.

davem26
 
Posts: 1
Joined: July 28th, 2010, 3:46 am

Post Posted July 28th, 2010, 4:03 am

Hi all

Having had to deal with adding Lightning (who put their extension ID at the end of the install.rdf) to Tbird, I thought that checking for the Mozilla product IDs would be a good idea. This ought to check for other em:id tags that may appear before the id of the extension itself (I've used ckislam's script originally, but it should be easy to modify it for flabdablet's), replace the existing FOR loop with this:

Code: Select all
SETLOCAL ENABLEDELAYEDEXPANSION
FOR /F "tokens=2,3 delims=^<^>=" %%i in ('FIND "em:id" "install.rdf"') DO (
   IF "%%~j"=="" (
      SET xml_id=%%~i
   ) ELSE (
      SET xml_id=%%~j
   )
   IF /I "!xml_id!" NEQ "" (
:: don't match tbird's id
      IF /I "!xml_id!" NEQ "{3550f703-e582-4d05-9a08-453d09bdfdc6}" (
:: don't match seamonkey's id   
         IF /I "!xml_id!" NEQ "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}" (
:: don't match firefox's id
            IF /I "!xml_id!" NEQ "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" (
:: don't match sunbird's id            
               IF /I "!xml_id!" NEQ "{718e30fb-e89b-41dd-9da7-e25a45638b28}" (
                  GOTO :vaivai
               )
            )
         )
      )
   )
)


If there are more em:ids for other Mozilla products then they can be added fairly easily.

Dave

Return to Firefox General


Who is online

Users browsing this forum: No registered users and 1 guest