I have a batch file which silently installs Firefox and this works fine. (I add -ms
to the line where I execute the installation file.)
Now I want to update Firefox in the same batch file only if it's not the newest Version. The version test is already in the batch file and is working fine.
And now my Question is: How can I silently update Firefox?
I already tried the steps from this link but they are not working, no errors just doing nothing. Is there maybe another possibility?
Edit:
This is the code of my batch file.
The line if %errorlevel%==1 %INSTALLDIR%Mozilla Firefoxupdater.exe -ms
needs to be replaced with the silent update for Firefox (which is hopefully working).
@echo off
IF %PROCESSOR_ARCHITECTURE%==x86 SET INSTALLDIR=%ProgramFiles%
IF %PROCESSOR_ARCHITECTURE%==AMD64 SET INSTALLDIR=%ProgramFiles(x86)%
IF NOT EXIST "%INSTALLDIR%Mozilla Firefoxfirefox.exe" goto install
REM Update Firefox if the Version is not 37.0
:update
CD %INSTALLDIR%Mozilla Firefox
firefox -v | more | find /i "37"
if %errorlevel%==0 goto end
if %errorlevel%==1 %INSTALLDIR%Mozilla Firefoxupdater.exe -ms
goto end
REM Install Firefox if it's not installed yet
:install
\******Firefox-Setup-37.exe -ms
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…