prathapml Posted October 4, 2004 Posted October 4, 2004 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. Do tell how it goes.
Diabolical82 Posted October 4, 2004 Author Posted October 4, 2004 Humm that's something new for me. Thanks i'll give it a try
jdoe Posted October 4, 2004 Posted October 4, 2004 @prathapml@Diabolical82REG 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\""/fThe code above won't work because FOR is an internal command of CMD.EXEYou need to add something like CMD.EXE /C before using FOR commandIt 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\"" /fEDIT:And %%I need to be %I because this command is not run in a batch fileEDIT2:There is another error at the end with %%I.xpiNEW CORRECTIONREG 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
prathapml Posted October 4, 2004 Posted October 4, 2004 @jdoeThanks for those things setting it right. Let's hope it works for diabolical. PHEW!!!! any more corrections? lolNow 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\"\"" /fdiabolical, we're waiting to hear whether this was successful or not.
Diabolical82 Posted October 5, 2004 Author Posted October 5, 2004 It passed thru without error, unfortunate none of extensions is installed.
prathapml Posted October 5, 2004 Posted October 5, 2004 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" /fREG ADD %KEY%\050 /v 3 /d "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %DVDROM%\Applications\Firefox\xpi\file2-name.xpi" /fREG ADD %KEY%\050 /v 4 /d "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %DVDROM%\Applications\Firefox\xpi\file3-name.xpi" /fREG ADD %KEY%\050 /v 5 /d "\"%PROGRAMFILES%\Mozilla Firefox\firefox.exe\" -install-global-extension %DVDROM%\Applications\Firefox\xpi\file4-name.xpi" /fIt 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)
Diabolical82 Posted October 5, 2004 Author Posted October 5, 2004 First extension will be install, but there's a pop up windows asking me if I want to import bookmark and settings. Wow, Firefox is costing me arms and legs already....
CoffeeFiend Posted October 5, 2004 Posted October 5, 2004 First extension will be install, but there's a pop up windows asking me if I want to import bookmark and settings. Wow, Firefox is costing me arms and legs already....Perhaps we install firefox different ways... ?
syntax_13 Posted October 5, 2004 Posted October 5, 2004 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).
Diabolical82 Posted October 5, 2004 Author Posted October 5, 2004 @crahakI install my firefox by editing config.ini and swap setup.exe from mozilla
prathapml Posted October 5, 2004 Posted October 5, 2004 I install my firefox by editing config.ini and swap setup.exe from mozillaThen 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.
Diabolical82 Posted October 5, 2004 Author Posted October 5, 2004 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
prathapml Posted October 5, 2004 Posted October 5, 2004 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.
Diabolical82 Posted October 5, 2004 Author Posted October 5, 2004 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 ExtensionsDescription Long= Improves tabbed browsing.Archive=tabextensions_en.xpiInstall Size= Install Size System=Install Size Archive=Attributes=SELECTED|VISIBLE|ENABLEDForce Upgrade File0=[SETUP PATH]\chrome\tabextensions.jarFileCount= 1P.S. I open .xpi file with WinRar to find out what's the name of .jar fileOn the other hand, I don't think mozilla's setup.exe support extensions....
sleepnmojo Posted November 16, 2004 Posted November 16, 2004 Can anyone get the -install-global-extension command line arg working in FF 1.0? Doesn't seem to be working. Only way I can get it to work is by drag n drop. I've read the other threads, and prefer this method.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now