Firefox silent native install without Mozilla Maintenance Service

CatOnRug solve, automate, speed up
Download 32-bit and 64-bit installer files:
https://www.mozilla.org/en-US/firefox/all/

Rename files like:
Firefox Setup 50.1.0 x64.exe
Firefox Setup 50.1.0 x86.exe
Create file
silent-install.cmd
@echo off
set sw=HKLM\SOFTWARE
set u=Microsoft\Windows\CurrentVersion\Uninstall
set n=Mozilla Firefox
if not "%ProgramFiles(x86)%"=="" set x=Wow6432Node\
setlocal EnableDelayedExpansion

:detect32bit
reg query "%sw%\%x%%u%" /s | find "%n%" > nul 2>&1
if !errorlevel!==0 goto exists

:nativeDetect
reg query "%sw%\%u%" /s | find "%n%" > nul 2>&1
if !errorlevel!==0 goto exists

echo %n%

:x64
if not "%ProgramFiles(x86)%"=="" (
for /f "delims=" %%a in ('dir /b "%~dp0Firefox*Setup*x64.exe"') do (
start /wait "" "%~dp0%%a" /SILENT MaintenanceService=false
)
)

:x86
if "%ProgramFiles(x86)%"=="" (
for /f "delims=" %%a in ('dir /b "%~dp0Firefox*Setup*x86.exe"') do (
start /wait "" "%~dp0%%a" /SILENT MaintenanceService=false
)
)

:exists
endlocal

No comments:

Post a Comment