Jump to content

Firefox installer that contains extensions


CHANDER

Recommended Posts

Hi, I'm using Simonsay's silent Firefox installer and I downloaded the extensions/themes that I wanted and was calling them from a second entry in WPI but then I tried to get fancy and include them in the silent installer.

I changed the installers setup path to setup.cmd (code below) hoping that this would install firefox, and then procede to install my extensions automatically.

Needless to say it didnt work, otherwise I wouldnt be posting this...

It gives me an error that it couldnt find -install-global-extension

setup.cmd

@ECHO OFF
rem cmdow @ /HID

start /wait setup.exe -ms -ira
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\dictionarysearch-0.7-fx+mz+tb.xpi"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\download_manager_tweak-0.6.3-fx.xpi"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\download_statusbar-0.9.2-fx.xpi"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\googlebar-0.9.0.30-fx.xpi"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\googlepreview-0.8-fx.xpi"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\hotmail_tabs-0.9-fx.xpi"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\launchy-3.5.0-fx+tb.xpi"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\mouse_gestures-1.0-fx+mz+tb.xpi"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\noia_2.0_(extreme)-2.81-fx.jar"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\plastikfox_crystal_svg-1.5.1-fx.jar"
start /wait "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%CD%\tabbrowser_preferences-1.1.1-fx.xpi"

exit

the start and %CD% lines are one line any help as to why this didnt work would be appreciated

Link to comment
Share on other sites


not sure but try...

for %%e in ("%CD%\*.xpi") do "%PROGRAMFILES%\Mozilla Firefox\firefox.exe" -install-global-extension "%%e"

for %%e in ("%CD%\*.jar") do "%PROGRAMFILES%\Mozilla Firefox\firefox.exe" -install-global-extension "%%e"

and if it don't work...

start /wait %programfiles%\Mozilla Firefox\firefox.exe -install-global-extension "%CD%\dictionarysearch-0.7-fx+mz+tb.xpi"

ps: better to keep this questions on the firefox's thread :)

Link to comment
Share on other sites

The second method wouldnt work because Program Files would require quotes around it I believe. I just scrapped the idea and left it as it was originally...a second line in my wpi wont really hurt anything :P

Link to comment
Share on other sites

SiMoNsAyS -

Actually for themes its "-install-global-theme"

Any ways here is some AutoIt code that does the above.

; Install XPI files
$search = FileFindFirstFile ( @ScriptDir & "\Cache_XPI\*.xpi" )
If $search <> -1 Then
While 1
 $xpi = FileFindNextFile ( $search )
 If @error Then ExitLoop

 RunWait ( @ProgramFilesDir & "\Mozilla Firefox\firefox.exe -install-global-extension " & Chr(34) & @ScriptDir & "\Cache_XPI\" & $xpi & Chr(34) )
 Sleep ( 500 )
Wend
FileClose ( $search )
EndIf

; Install Themes files
$search = FileFindFirstFile ( @ScriptDir & "\Cache_Theme\*.jar" )
If $search <> -1 Then
While 1
 $jar = FileFindNextFile ( $search )
 If @error Then ExitLoop

 RunWait ( @ProgramFilesDir & "\Mozilla Firefox\firefox.exe -install-global-theme " & Chr(34) & @ScriptDir & "\Cache_Theme\" & $jar & Chr(34) )
Wend
FileClose ( $search )
EndIf

Link to comment
Share on other sites

What I did at some point (with Thunderbird, but I reckon it would work with Firefox as well) is add the xpi to the install files before remaking it into an sfx, and adding the relevant entry to config.ini, since all components are xpi anyways. After the setup the minimizetotray.xpi was indeed installed and working.

I stumbled upon it by accident, and realized I had to redo it for every new version, so the install-global way would be a lot easier. But I think it would be fairly easy to automate; the syntax is pretty straightforward (and probably documented in detail).

Link to comment
Share on other sites

@Nologic didn't know about that, although global-extension always worked for me. i'll update my cmds thanks :D

@tinnef thought on that too. maybe firefox is different from thunderbird or maybe i was a bit blind but i couldn't find the way to add them without corrupting the installer.

anyway every new version will need a lot of work updating the installer so for the moment i'll stick to the cmd method.

Link to comment
Share on other sites

tinnef -

Actually I'd be very interested in seeing what kind of edits you made to the ini file. I have a new alpha autoit script that makes changes to the ini file prior to running the installation...this was the only way I could fine to alter the default install path.

So really with some slight modifications to the above posted code...I can update the ini on the fly...so one can then update or add or remove extensions and themes as they like.

Really with being able to update the ini file...I would then only be slightly slower than SiMoNsAyS method when dealing with large collections of extensions and themes....hehe right now....mine is butt a** slow. ;)

SiMoNsAyS -

Really at this point you could probably use ether one of them for themes and extensions...I don't think there is currently any diff with the install methods for ether file type...but that might change in the future. Your welcome also.

Well if you got any info to add on the ini edits I'd be very interested. :)

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