Integrate Firefox Addons / Plugins
#1
Posted 14 April 2006 - 07:46 AM
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
Posted 14 April 2006 - 09:09 AM
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
Posted 16 April 2006 - 01:24 PM
@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
Posted 17 April 2006 - 02:24 AM
/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
Posted 18 April 2006 - 11:15 AM
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
Posted 18 April 2006 - 02:00 PM
Mikka, on Apr 16 2006, 07:24 PM, said:
@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
@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>`
#8
Posted 19 April 2006 - 03:13 AM
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
Posted 19 April 2006 - 06:29 AM
WotC, on Apr 19 2006, 10:13 AM, said:
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...
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)
-
ffext.zip (374bytes)
Number of downloads: 32
#10
Posted 19 April 2006 - 08:04 AM
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
Posted 19 April 2006 - 09:17 AM
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
Posted 21 April 2006 - 03:39 PM
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
- ← Preventing installation of Windows firewall in an unattended install
- Application Installs
- Installshield issues →



Help
Back to top









