Changes

Firefox ext install downloads

25 bytes added, 15:48, 6 December 2011
remove-extensions.cmd updated for 32/64 bit
set return=goto :eof
set rmdir=rmdir /s /q
:: set xpidir=Cc:\NETINSTnetinstset xpidir=%SOFTWARE%\packages\mozilla\fx_extensions:: set zip="%ProgramFiles%\7-Zip\7z.exe"set zip="%SOFTWARE%\packages\mozilla\7-Zip\7z.exe"
:: :: give args on command line
:: Install REMOVE a Mozilla extension XPI package into from a system-wide folder, and adddelete
:: the registry key required to tell the Mozilla app it's there.
::
:mozextn
if exist "%ProgramFiles%\Mozilla Firefox\firefox.exe" goto :nurXP
if not exist "%ProgramFiles(x86)%\Mozilla Firefox\firefox.exe" %return%
:nur32
set extnroot=%CommonProgramFiles(x86)%\Mozilla Shared\Extensions
if not exist "%extnroot%" mkdir "%extnroot%"
if errorlevel 1 %return%
set key=HKLM\Software\Wow6432Node\Mozilla\%1\Extensions
 
 
goto nextall
:nurXP
set extnroot=%CommonProgramFiles%\Mozilla Shared\Extensions
if not exist "%extnroot%" mkdir "%extnroot%"
if errorlevel 1 %return%
set key=HKLM\Software\Mozilla\%1\Extensions
 
:nextall
set extndir=%extnroot%\%2
if exist "%extndir%" %rmdir% "%extndir%"
%zip% x -yo"%extndir%" "%xpidir%\%2.xpi"
if errorlevel 1 %return%
for /f "skip=2 tokens=*" %%L in ('find "<em:id>" "%extndir%\install.rdf"') do @(
goto :mozextn1
)
 
:mozextn1
set id=%line:~8,-9%
if "%id%"=="" (
%rmdir% "%extndir%"
verify error 2>nul
%return%
)
set olddir=%ProgramFiles%\Mozilla %1\extensions\%id%
if exist "%olddir%" %rmdir% "%olddir%"
set key=HKLM\Software\Mozilla\%1\Extensions
for /f "skip=4 tokens=2*" %%A in ('reg query "%key%" /v "%id%"') do set olddir=%%B
if not "%olddir%"=="%extndir%" if exist "%olddir%" %rmdir% "%olddir%"
reg add delete "%key%" /v "%id%" /d "%extndir%" /f
%return%
</source>
66
edits