w10install/scripts/install-firefox.cmd

76 lines
2.1 KiB
Batchfile
Raw Permalink Normal View History

2021-01-10 18:45:55 +01:00
@echo off
2021-02-28 21:25:39 +01:00
set CONFIG=config\firefox
2021-02-27 20:07:28 +01:00
set SCRIPTS=..\scripts
set SOFTWARE=..\software
2021-02-28 21:25:39 +01:00
set EXE=firefox-setup.exe
2024-12-13 23:45:59 +01:00
if not defined browser_homepage set browser_homepage=google.com
2021-01-10 18:45:55 +01:00
2021-02-28 21:25:39 +01:00
if NOT EXIST %SOFTWARE%\%EXE% (
echo ERROR: %SOFTWARE%\%EXE% not found!
2021-02-27 20:07:28 +01:00
exit /b
)
2021-01-10 18:45:55 +01:00
2021-02-27 20:07:28 +01:00
set FIREFOXBASE="%ProgramFiles%\Mozilla Firefox"
set BADGERFILE=%SOFTWARE%\privacybadger-addon.xpi
2022-12-24 14:12:11 +01:00
set BADGERTARGET=jid1-MnnxcxisBPnSXQ-eff@jetpack.xpi
2021-01-10 18:45:55 +01:00
2021-02-27 20:07:28 +01:00
set UBLOCKFILE=%SOFTWARE%\ublockorigin-addon.xpi
2021-01-10 18:45:55 +01:00
set UBLOCKTARGET=uBlock0@raymondhill.net.xpi
set TPMFILE=%SOFTWARE%\tpm-addon.xpi
set TPMTARGET=info@teampasswordmanager.com.xpi
2021-01-10 18:45:55 +01:00
echo ####### %0 #######
2022-12-24 14:12:11 +01:00
echo killing firefox ...
taskkill /f /im firefox.exe 1>nul 2>nul
2021-02-28 21:25:39 +01:00
cd %SOFTWARE%
2021-03-30 21:21:53 +02:00
@echo on
2021-02-28 21:25:39 +01:00
firefox-setup.exe /S /MaintenanceService=false /TaskbarShortcut=false /RegisterDefaultAgent=false
2021-03-30 21:21:53 +02:00
@echo off
2023-01-22 21:18:28 +01:00
echo sleeping 5 seconds ...
2021-03-30 22:38:15 +02:00
ping 127.0.0.1 -n 5 > NUL 2>&1
2021-01-10 18:45:55 +01:00
cd %SCRIPTS%
rem copy config ...
2021-02-28 21:25:39 +01:00
copy /Y %CONFIG%\local-settings.js %FIREFOXBASE%\defaults\pref
copy /Y %CONFIG%\mozilla.cfg %FIREFOXBASE%
2021-01-10 18:45:55 +01:00
2024-12-13 23:45:59 +01:00
rem set browser homepage ...
searchreplace "%ProgramFiles%\Mozilla Firefox\mozilla.cfg" ___HOMEPAGE___ %browser_homepage%
2021-01-10 18:45:55 +01:00
echo disabling FireFox updates (all users) ...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox" ^
/v DisableAppUpdate ^
/t REG_DWORD ^
/d 1 ^
/f
echo enabling FireFox Bookmarks-bar for all users ...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox" ^
/v DisplayBookmarksToolbar ^
/t REG_DWORD ^
/d 1 ^
/f
echo creating extensions directory ...
mkdir %FIREFOXBASE%\distribution\extensions 1>nul 2>nul
echo installing badger(eff) to fight internet bullshit ...
copy /Y %BADGERFILE% %FIREFOXBASE%\distribution\extensions\%BADGERTARGET%
echo installing uBlock to fight even more internet bullshit ...
copy /Y %UBLOCKFILE% %FIREFOXBASE%\distribution\extensions\%UBLOCKTARGET%
2022-12-24 14:12:11 +01:00
echo installing Team Password Manager plugin ...
copy /Y %TPMFILE% %FIREFOXBASE%\distribution\extensions\%TPMTARGET%
2021-01-10 18:45:55 +01:00
2023-01-16 09:21:50 +01:00
echo setting firefox as default browser ...
SetDefaultBrowser.exe HKLM "Firefox-308046B0AF4A39CB"
2021-01-10 18:45:55 +01:00
echo ####### %0 #######