Jump to content

Firefox Extensions


Diabolical82

Recommended Posts

The one i'm using, you know long grey square box with listing of apps. Dunno maybe it's simple syntax mistake I'm not sure anyway.

See anything wrong with it?

@Diabolical,

No probs, you can stick with runonce if you don't like the other methods. The docu for RunOnceEX method says it all.... You can't use (") quotes in the command that you run. If you DO want quotes, you need to pre-fix a back-slash (that is : " = \"). As an example, your corrected code (the corrected line alone) would be:

REG ADD %KEY%\050 /V 2 /D  "for %%i in *.xpi do \"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension \"%DVDROM%\Applications\Firefox\xpi\%%i.xpi\""/f

(all of the above is one line, though the page-rendering is breaking it to 3 lines; and yes, you read it right, the double-double quotes at the end of the line, since the command wasn't closed without that)

That should (hopefully) work. :thumbup Do tell how it goes.

Link to comment
Share on other sites


@prathapml

@Diabolical82

REG ADD %KEY%\050 /V 2 /D  "for %%i in *.xpi do \"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension \"%DVDROM%\Applications\Firefox\xpi\%%i.xpi\""/f

The code above won't work because FOR is an internal command of CMD.EXE

You need to add something like CMD.EXE /C before using FOR command

It should look like this (not tested)

REG ADD %KEY%\050 /v 2 /d "CMD.EXE /C FOR %%I IN (*.xpi) DO \"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension \"%DVDROM%\Applications\Firefox\xpi\%%I.xpi\"" /f

EDIT:

And %%I need to be %I because this command is not run in a batch file

EDIT2:

There is another error at the end with %%I.xpi

NEW CORRECTION

REG ADD %KEY%\050 /v 2 /d "CMD.EXE /C FOR %I IN (*.xpi) DO \"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension \"%DVDROM%\Applications\Firefox\xpi\%I\"" /f

Link to comment
Share on other sites

@jdoe

Thanks for those things setting it right. Let's hope it works for diabolical. PHEW!!!! any more corrections? :P lol

Now here's another... you need to have commands run through the CMD interpreter in quotes as well, like:

CMD.exe /C "whatever command /blah-blah"

So, after YET another correction, the code stands at:

REG ADD %KEY%\050 /v 2 /d "CMD.EXE /C \"FOR %I IN (*.xpi) DO \"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension \"%DVDROM%\Applications\Firefox\xpi\%I\"\"" /f

diabolical, we're waiting to hear whether this was successful or not.

Link to comment
Share on other sites

Okay then....

Let's forget the FOR loops and do it the normal way:

REG ADD %KEY%\050 /v 2 /d "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %DVDROM%\Applications\Firefox\xpi\file1-name.xpi" /f

REG ADD %KEY%\050 /v 3 /d "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %DVDROM%\Applications\Firefox\xpi\file2-name.xpi" /f


REG ADD %KEY%\050 /v 4 /d "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %DVDROM%\Applications\Firefox\xpi\file3-name.xpi" /f


REG ADD %KEY%\050 /v 5 /d "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %DVDROM%\Applications\Firefox\xpi\file4-name.xpi" /f

It will still be fast enough. Just that it will take a few seconds more to type it in for all of the plug-ins. (and note that in the above example, the .XPI's should be renamed if they have spaces in the filename)

Link to comment
Share on other sites

About the not installing xpi part...

When running CMD.EXE, using (*.xpi) assumes you are already in the right directory. This is most likely not the case.

So the command should be changed to scan the correct folder for xpi's.

Maybe somthing like (c:\install\firefox\xpi\*.xpi).

Link to comment
Share on other sites

I install my firefox by editing config.ini and swap setup.exe from mozilla
Then why are you using this method?

The config.ini itself can be instructed to install all the XPIs that you want, I think. Much easier that way.

And if you DO want to use this method, then you need to edit the preferences.js (in firefox folder) to tell it to skip the "Do you want to import bookmarks and settings" dialog.

Link to comment
Share on other sites

I liked your idea, I'll mess with config.ini and see how it turn out.

Do you mean the one in \%UserProfile%\Application Data\Mozilla\Firefox\Profiles\*.default well that folder doesnt exist until I first launch firefox, usually that folder will have a random name pretty much like this cy73xud49.default

Link to comment
Share on other sites

I don't mean that folder. I meant, if you still want to use as the above previous method ("firefox.exe -install-global-extension blah-blah.XPI" method), then you need to edit the preferences.js in the firefox folder itself. It will be present somewhere in "%ProgramFiles%\Firefox\defaults\profile" folder, or something like that.

But if you will directly use the config.ini method (from installer) to install XPIs, then you don't need to bother about the above.

Link to comment
Share on other sites

Cool, can I import user.js there too?

Anyway back to the topic. After messing around with config.ini, i'm not sure what I should fill in couple of blanks

[Component TabExtensions]
Description Short= Tab Extensions
Description Long= Improves tabbed browsing.
Archive=tabextensions_en.xpi
Install Size=
Install Size System=
Install Size Archive=
Attributes=SELECTED|VISIBLE|ENABLED
Force Upgrade File0=[SETUP PATH]\chrome\tabextensions.jar
FileCount=     1

P.S. I open .xpi file with WinRar to find out what's the name of .jar file

On the other hand, I don't think mozilla's setup.exe support extensions....

Link to comment
Share on other sites

  • 1 month later...

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...