Jump to content

Firefox Extensions


benners

Recommended Posts

Does anyone know a way to silently install the xpi files to the profiles folder in the appdata dir instead of the application dir C:\Program Files\Mozilla Firefox\extensions.

I know about the -install-global-extension command and have tried editing the extensions.ini, xpti.dat and compreg.dat files to reflect the different directories but no joy.

The reason I want this is I have a list of 20 extensions that a user can choose from using the XPlode selected install method. Installing isn't problem but as they get installed in the application folder, if a profile is backed up it wont work on a fresh install of Firefox. The ones I use on Thunderbird work fine when moved from the application folder to the appdata folder as no other files seem to be altered, but I am struggling with Firefox.

Link to comment
Share on other sites


@benners,

Have you tried using Silence of the Foxes (SOF) to generate a silent switchless Firefox installer which includes all your themes and extensions? If not, I'd recommend it as it works very well. To grab it, do a search for SOF.

Link to comment
Share on other sites

@benners,

Have you tried using Silence of the Foxes (SOF) to generate a silent switchless Firefox installer which includes all your themes and extensions? If not, I'd recommend it as it works very well. To grab it, do a search for SOF.

Hi SRJ,

I already have my own installer which installs silently, add the reg entries for association, deletes shortcuts then checks for profiles for the user currently logged on, if none is found a default is installed. The default has no settings or extensions and is used for people who want to specify the extensions they use instead of being dumped with 20 extensions that are not useful for them, this is why I want to install to the appdata folder, so that once the extensions have been chosen and the settings tweaked the user profile can be backed up and added to the install for next time.

Link to comment
Share on other sites

Hi Benners,

I liked your idea so I've been researching for it the whole day yesterday but to no avail.

It looks like it's a feature to avoid any security breach.

Now, there is still the AutoIt solution.

Mozilla uses is own type of controls with no text visible from outside and that you cannot access directly using 'controlclick' but this kind of solution is working:

;title of the extension installation window (something like "program installation")
Const $xpiInstallWindowTitle="Installation de logiciel"

BlockInput(1)

;Improve this from the user's choice
_xpiProfileInstall(".\extensions\fireftp-0.90.1.1-fx.xpi")
_xpiProfileInstall(".\extensions\adblock_plus-0.6.1.2-fx+fl+mz+ns.xpi")
_xpiProfileInstall(".\extensions\adblock_filterset.g_updater-0.3.0.2-fx+fl+mz+ns.xpi")
_xpiProfileInstall(".\extensions\colorful_tabs-1.1-fx+mz.xpi")
_xpiProfileInstall(".\extensions\bookmark_duplicate_detector-0.2.2-fx.xpi")
;...

ProcessClose("firefox.exe");Shut the door when leaving...
BlockInput(0) ;...and hand back the keys


;Da workin' man
func _xpiProfileInstall($extensionfile)
Run('"' & @ProgramFilesDir & '\Mozilla Firefox\firefox.exe" "' & $extensionfile & '"')
WinWait($xpiInstallWindowTitle,"", 10)
If WinExists($xpiInstallWindowTitle) Then
sleep(5000)
Send("{ENTER}")
sleep(3000)
EndIf
EndFunc

I tested it at run time and it went smoothly. Test is still need at install time.

I hope this can help, and I also would be interested in your installer, as well as the one for thunderbird, if you don't mind sharing them here.

Link to comment
Share on other sites

Hi Djé,

Thanks for your reply, I have been so myopic about installing the extensions silently and with as little fuss and code as poss, totally blanked runnnig the exe with the filename :blushing: , nice catch.

What could also be done is use WinWaitActive to wait until the window is visible then move it off screen (poor mans silent :D ). I could write the extensions the user selected to a temp file, then parse the filenames from the file and install them. maybe add error checking for extensions that are not compatible or missing and write the errors to a log file. I test the extensions before installation but don't use them all myself, so a few may slip few.

I use XPlode and AutoIt scripts to build my DVD image and one part parses the extensions dir and gets the filenames, the XPlode xml is updated with the version number if changed and this saves editing the xml everytime I add a new extension of a new version comes out.

My installers are just silent sfx's created with WinRAR and these contain the files that are extracted from the firefox or thunderbird setup exes, they are extracted to the temp dir and an appropriate icon is used for the sfx.I have attached my AutoIt script, this is compiled to Mozilla.exe and run from XPlode with command line options.

installer.rar

Link to comment
Share on other sites

and it sets the extentions for all users :D

@bledd

Thats the problem, I don't want to install extensions that are not going to be useful, if I dont use ebay I don't want ebaynegs or if I have a pop3 mail account I dont need the webmail, hotmail and gmail extensions, and I dont want to have other folks searchplugins. :no:

Link to comment
Share on other sites

1. Extract the setup files with 7-zip

2. Open up browser.xpi with 7-Zip

3. Copy all your extentions to browser.xpi\bin\extensions\

4. Copy all your plugins to browser.xpi\bin\plugins\

5. Open up "your language".xpi

6. Copy all the search plugins to "your language".xpi\bin\searchplugins\

7. Delete any you don't want.

8. Either run setup.exe directly or make a 7-Zip switchless installer see my signature.

Link to comment
Share on other sites

1. Extract the setup files with 7-zip

2. Open up browser.xpi with 7-Zip

3. Copy all your extentions to browser.xpi\bin\extensions\

4. Copy all your plugins to browser.xpi\bin\plugins\

5. Open up "your language".xpi

6. Copy all the search plugins to "your language".xpi\bin\searchplugins\

7. Delete any you don't want.

8. Either run setup.exe directly or make a 7-Zip switchless installer see my signature.

Hi keytotime,

If I followed your process above how would the user be able to choose which extensions or seachplugins they wanted to install?. I will not be the only person using these installers and would like to offer the flexibility of installing only the searchplugins and extensions they wanted. After using Firefox and setting the options for the different extensions a user could then send me their profiles dir and I could add it to the profiles dir and next time it would be copied after the installation, but I can't see a way using your method, am I missing something?

Also, if I am understanding it correctly using SOF is good for 1 user but would not work for multiple users as you would need to create a seperate executable for every user, is this correct.?

Thanks.

Link to comment
Share on other sites

1. Extract the setup files with 7-zip

2. Open up browser.xpi with 7-Zip

3. Copy all your extentions to browser.xpi\bin\extensions\

4. Copy all your plugins to browser.xpi\bin\plugins\

5. Open up "your language".xpi

6. Copy all the search plugins to "your language".xpi\bin\searchplugins\

7. Delete any you don't want.

8. Either run setup.exe directly or make a 7-Zip switchless installer see my signature.

:yes:

Though SOF is commented excellent, this is what I follows as I don't need to download again the extensions and themes. Once installed, the extension applies to all profiles. I want it that way.

One question is: what about the talkback.xpi and xpcom.xpi? I deleted them but i'm not so sure if the installer works fine after that.

:whistle:

Edited by QKnet
Link to comment
Share on other sites

One question is: what about the talkback.xpi and xpcom.xpi? I deleted them but i'm not so sure if the installer works fine after that.

:whistle:

Edit config.ini to skip their installation. (xpcom is already skipped by default)

In that file, you can also set install mode to silent, so you won't any switch.

Link to comment
Share on other sites

and it sets the extentions for all users :D

@bledd

Thats the problem, I don't want to install extensions that are not going to be useful, if I dont use ebay I don't want ebaynegs or if I have a pop3 mail account I dont need the webmail, hotmail and gmail extensions, and I dont want to have other folks searchplugins. :no:

what???????

it only installs extentions that you tell it to

just try it out, it is what you're looking for :realmad:

Link to comment
Share on other sites

and it sets the extentions for all users :D
what???????

it only installs extentions that you tell it to

What? What ???????

Of course, but 'all users' means in the 'program files' extensions folder, not in the 'profile' extensions folder.

If different person are using the same computer they may not want to have their browser poluted by unwanted extensions.

For exemple, my grand-mother may not use the same extensions as me (such as the web developper toolbar, for which I have no use).

And my grand-daughter neither (sorry no grand-daughter yet, so no exemple).

So we need to have separated extension set (even with possible doubles) in our own profile folders.

Beside, it's a good practice to not assume what people want or need. :whistle:

And so install things to relevant users profiles and not ALL users when they are meant to be used by only one user.

Mozilla knows that and installs extensions to your profile when done manually.

just try it out, it is what you're looking for :realmad:
You know me better than I, heh!? ;) Edited by Djé
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...