MSFN Forum: Integrate Firefox Addons / Plugins - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Integrate Firefox Addons / Plugins Rate Topic: -----

#1 User is offline   Plasma 

  • Newbie
  • Group: Members
  • Posts: 37
  • Joined: 05-January 06

Posted 14 April 2006 - 07:46 AM

I've got a Cab'd version of Firefox for use with nLite, I'm wanting to integrate a few extensions in the build too. They are all in .XPI format.

Anyone any ideas on how I can manage this? either by integrating them in the Firefox install or as a separate install. If someone can tell me how to do it I'm ok will packing / building the installer my self.

Cheers

Plasma


#2 User is offline   WotC 

  • Member
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 29-January 05

Posted 14 April 2006 - 09:09 AM

if you start if from a *.bat/*.cmd file:
IF EXIST "%programfiles%\Mozilla Firefox\firefox.exe" for %%e in ("%cdrom%\Install\Mozilla_Firefox\*.xpi") do "%programfiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%%e"


if you start it directly from the commandline, replace each %% with %. you can remove the IF EXIST check, too! and of course, adjust the path(s) accordingly!
hope that helps.

This post has been edited by WotC: 14 April 2006 - 09:10 AM


#3 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 16 April 2006 - 01:24 PM

This one's more flexible:

@echo off &setlocal EnableExtensions
For /f "tokens=3" %%? in ('reg query "HKLM\SOFTWARE\Mozilla\Mozilla Firefox 1.5\bin" /v PathToExe') Do If errorlevel 0 Set Ff=%%?
If "%Ff%"=="" Goto :EOF
For /f %%x in ('dir /b/on *.xpi 2^>^nul') Do (
   Start /wait %Ff% -install-global-extension %%~dpx%%x
)
endlocal

Just throw your extensions in some folder and launch this script, let's call it FfExts.cmd.
Worked fine for me so far.

#4 User is offline   WotC 

  • Member
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 29-January 05

Posted 17 April 2006 - 02:24 AM

nice, indeed. however, i some problems with this script. it sets the %Ff% variable to "c:\program" because it should be "c:\program files". obviously it stops when encountering a space. any solutions?

/edit:
FOR /F "tokens=3*" %A IN ('reg query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal"') DO SET mydocs=%A %B


does the job

This post has been edited by WotC: 17 April 2006 - 03:49 AM


#5 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 18 April 2006 - 11:15 AM

Dаmn it, you're absolutely right: As %ProgramFiles% is set to Programme in my development environment, I didn't take account of the whitespace.
Try this (untested):
[…]
   Start /wait "%Ff%" -install-global-extension %%~dpx%%x
[…]

It's merely quick'n dirty, there should be a more elegant solution, though.

This post has been edited by Mikka: 18 April 2006 - 11:16 AM


#6 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,117
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 18 April 2006 - 02:00 PM

View PostMikka, on Apr 16 2006, 07:24 PM, said:

This one's more flexible:

@echo off &setlocal EnableExtensions
For /f "tokens=3" %%? in ('reg query "HKLM\SOFTWARE\Mozilla\Mozilla Firefox 1.5\bin" /v PathToExe') Do If errorlevel 0 Set Ff=%%?
If "%Ff%"=="" Goto :EOF
For /f %%x in ('dir /b/on *.xpi 2^>^nul') Do (
   Start /wait %Ff% -install-global-extension %%~dpx%%x
)
endlocal
Nice try Mikka, how's this?
  @ECHO OFF &SETLOCAL ENABLEEXTENSIONS
  FOR /F "TOKENS=3 DELIMS=	" %%? IN ('REG QUERY "HKLM\SOFTWARE\Mozilla\Mozilla Firefox" /S ^|FINDSTR "\<PathToExe\>" 2^>NUL') DO (IF ERRORLEVEL 0 (SET FFFP="%%?"))
  IF NOT DEFINED FFFP (ENDLOCAL &GOTO :EOF)
  FOR /F "DELIMS=" %%? IN ('DIR/B/OD *.XPI ^2^>NUL') DO (IF ERRORLEVEL 0 (START "" /WAIT %FFFP% -INSTALL-GLOBAL-EXTENSION "%%?"))
  ENDLOCAL &GOTO :EOF
Notes:
    Any lines not beginning with two spaces have line-wrapped
    On line 2 `delims=<tab>`


#7 User is offline   Mikka 

  • Junior
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 02-March 06
  • OS:none specified
  • Country: Country Flag

Posted 19 April 2006 - 03:02 AM

Thanks for the review, Yzöwl, looks promising.
:hello:

#8 User is offline   WotC 

  • Member
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 29-January 05

Posted 19 April 2006 - 03:13 AM

wow - this is even nicer! i was curious about the version number - but now... can anyone top this? please? PLEASE?!
but again i have the problem with the whitespace, so i need:
FOR /F "TOKENS=3*" %%A IN ('REG QUERY "HKLM\SOFTWARE\Mozilla\Mozilla Firefox" /S ^|FINDSTR "\<PathToExe\>" 2^>NUL') DO (IF ERRORLEVEL 0 (SET Firefox_Path=%%A %%B))


furthermore i have problems when using a <tab>, thats why i changed to 3* and %%A %%B...

This post has been edited by WotC: 19 April 2006 - 03:14 AM


#9 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,117
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 19 April 2006 - 06:29 AM

View PostWotC, on Apr 19 2006, 10:13 AM, said:

wow - this is even nicer! i was curious about the version number - but now... can anyone top this? please? PLEASE?!
but again i have the problem with the whitespace, so i need:
FOR /F "TOKENS=3*" %%A IN ('REG QUERY "HKLM\SOFTWARE\Mozilla\Mozilla Firefox" /S ^|FINDSTR "\<PathToExe\>" 2^>NUL') DO (IF ERRORLEVEL 0 (SET Firefox_Path=%%A %%B))


furthermore i have problems when using a <tab>, thats why i changed to 3* and %%A %%B...
There should be no problems with whitespace in my code, both variables used are enclosed within quotes and spaces are not used as delimiters!
As for a tab problem, my only guess is a limitation with your editor and /or chosen font. Try using the attached copy, in order to prevent duplication of that problem.

Attached File(s)

  • Attached File  ffext.zip (374bytes)
    Number of downloads: 32


#10 User is offline   WotC 

  • Member
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 29-January 05

Posted 19 April 2006 - 08:04 AM

i suppose the problem with the tab was that i tried to copy to a cmd window and the tab got removed :-(
as for the quotes/whitespaces: you are right, it works your way, BUT i wanted to use your command to read out the My Documents path and include e.g. the "My Pictures" path. this, however, is not possible with the quotes, is it?

#11 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,117
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 19 April 2006 - 09:17 AM

@ WotC
You should be able to do that with this!
  @ECHO OFF &SETLOCAL ENABLEEXTENSIONS
  FOR /F "TOKENS=3 DELIMS=	" %%? IN ('REG QUERY "HKCU\Software\Microsoft\Windows\Currentversion\Explorer\Shell Folders"^|FIND "My Music"') DO (SET USERMM="%%?")
  IF DEFINED USERMM (ECHO/Your 'My Music' folder is located at %USERMM%)
  ENDLOCAL &GOTO :EOF
Obviously DELIMS=<tab> still.
<Edit>
note
Just change the stuff inside the parentheses on line 3 to suit your requirements.
</Edit>

This post has been edited by Yzöwl: 19 April 2006 - 09:25 AM


#12 User is offline   WotC 

  • Member
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 29-January 05

Posted 21 April 2006 - 03:39 PM

sorry for not stating this clearly. what i'm doing (after a clean install of windows) is searching for a certain file on harddrives (right now the file Default.rdp, because its more or less common on the computers i'm taking care of) and setting the registry value of HKCU\Software\Microsoft\Windows\Currentversion\Explorer\Shell Folders to that path (i want to change from the Default.rdp file to a certain folder (i.e. Documents), though this is on progress right now). afterwards i want to overwrite the My Music setting in the registry with the same path (just add \My Music), the same with the My Pictures folder,...

so right now i do:
1) the %mydocs% value i get from here:
FOR /F "tokens=3" %%B IN ('ECHO list volume ^| DISKPART.EXE ^| FIND.EXE "Partition"') DO if exist "%%B:\Documents\Default.rdp" SET mydocs=%%B:\Documents


im searching also certain paths containing whitespaces - so if i do a SET mydocs="%%B" i end up with a path (stored as the variable %mydocs%) looking like "E:\User Files\Documents". if i attach a \My Music" to it i end up with "E:\User Files\Documents"\My Music". you see the problem? its not a typo (the quote before the \My). afterwards i want to

2) write the according path of the My Music folder to the registry:
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Music" /t REG_SZ /d "%mydocs%\My Music" /f


so IF i can do a search for a folder (to clearify: i think the right term would be i need a recursive folder search) some day AND write the path of this folder to the registry (including whitespaces, Music, etc) i would be glad :-)

This post has been edited by WotC: 21 April 2006 - 03:51 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy