Files
fogsnippets/34_Firefox/34_Firefox.bat
Stefan Tollkühn ec74d4a2c1 Initial commit
2025-09-18 14:02:17 +02:00

37 lines
1.0 KiB
Batchfile

@echo off
set VERSION=%1
set DOWNLOADFILE="%TEMP%\Firefox_%VERSION%.exe"
for /F "tokens=3" %%a in ('reg query "HKCU\Control Panel\International" /v LocaleName ^| find "LocaleName"') do (
for /F "tokens=1 delims=-" %%b in ("%%a") do set LANG=%%b
)
if "%LANG%" == "en" (
set LANG=en-US
) else if "%LANG%" == "es" (
set LANG=es-ES
) else if "%LANG%" == "pt" (
set LANG=pt-PT
) else if "%LANG%" == "sv" (
set LANG=sv-SE
)
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
set ARCH=win64
) else if "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
set ARCH=win64-aarch64
) else if "%PROCESSOR_ARCHITECTURE%" == "IA64" (
echo exit 255
) else if "%PROCESSOR_ARCHITECTURE%" == "x86" (
set ARCH=win32
) else (
echo exit 254
)
:: download firefox
"%SYSTEMROOT%\System32\bitsadmin.exe" /transfer /download https://ftp.mozilla.org/pub/firefox/releases/%VERSION%/%ARCH%/%LANG%/Firefox%%20Setup%%20%VERSION%.exe %DOWNLOADFILE% >NUL
:: install firefox
"%DOWNLOADFILE%" /S /PreventRebootRequired=true