Remember when Flash Player was a Macromedia product? I miss those days. Adobe needs to pull their developers head from their respective asses and figure out how to make a product updater that actually works. If all of your users are local administrators (are you stupid?) and you don't use a proxy server with active directory authentication (must be nice), and you trust your users to allow the update to run when asked (all too often) then you must represent their imaginary customer.
For the rest of you like myself, I had to write a horrific batch script to accomplish some simple tasks.
- Is there a new version that we need to install?
- If so - remove all the old stuff.
- Install the new stuff.
I like to install both the ActiveX *AND* the plugin. You don't need the plugin if you only run IE in your environment. But we are encountering a lot of applications written for Mozilla code (read Firefox). Might as well have it there if we need it.
Go download the files. To get your hands on the MSI installers, you will need to sign a distribution agreement. So I can't give you those files. Or even a link to them. While Adobe has no time to cater to the needs of their customers, they seem to have plenty of time tracking down and yelling at people like me.
Put your files out in some common place. Like the NETLOGON folder in your AD environment. Or a file share somewhere.
But enough of that - here is the script. Note, you might want to uncomment the pause at the bottom of this script so that you can do some debugging with it.
@ECHO OFF
REM Update Adobe Flash PlayerREM Steve Ballantyne 12/12/2014SET LATESTVERSION=16.0.0.235REM Make sure our Temp folder exists.IF NOT EXIST c:\Temp MKDIR c:\TempREM Check the LOGONSERVER variable - sometimes Windows is STOOPIDSIF [%LOGONSERVER%] == [] (set LOGONSERVER=\\SOMEDOMAINCONTOLLER)REM We must get rid of old versions of FlashIF EXIST c:\Windows\System32\Macromed\Flash\FlashUtil*ActiveX.exe (set SYSTYPE=System32)IF EXIST c:\Windows\SysWOW64\Macromed\Flash\FlashUtil*ActiveX.exe (set SYSTYPE=SysWOW64)DIR /B c:\Windows\%SYSTYPE%\Macromed\Flash\FlashUtil*ActiveX.exe > c:\Temp\flashuninst.txtset /P FLASHUNINST= < C:\Temp\flashuninst.txtREM Do a version check against INSTALLED version (eg FlashUtil32_15_0_0_246_ActiveX.exe)for /F "tokens=2 delims=_" %%a in ("%FLASHUNINST%") do SET MAJORV=%%afor /F "tokens=3 delims=_" %%a in ("%FLASHUNINST%") do SET MINORV1=%%afor /F "tokens=4 delims=_" %%a in ("%FLASHUNINST%") do SET MINORV2=%%afor /F "tokens=5 delims=_" %%a in ("%FLASHUNINST%") do SET MINORV3=%%aecho INSTALLED VERSION IS %MAJORV% %MINORV1% %MINORV2% %MINORV3%REM Chop up version number of the LATEST FlashPlayer (variable set at the top of this file)for /F "tokens=1 delims=." %%b in ("%LATESTVERSION%") do SET IMAJORV=%%bfor /F "tokens=2 delims=." %%b in ("%LATESTVERSION%") do SET IMINORV1=%%bfor /F "tokens=3 delims=." %%b in ("%LATESTVERSION%") do SET IMINORV2=%%bfor /F "tokens=4 delims=." %%b in ("%LATESTVERSION%") do SET IMINORV3=%%becho LATEST VERSION IS %IMAJORV% %IMINORV1% %IMINORV2% %IMINORV3%REM Compare MAJOR version first (if it's the same or lower we keep on truckin)IF %IMAJORV% GTR %MAJORV% goto UPDATEREM Compare Minor versions nextIF %IMAJORV% EQU %MAJORV% goto CHECKMINOR1:CHECKMINOR1IF %IMINORV1% GEQ %MINORV1% (goto UPDATE) ELSE (goto CHECKMINOR2):CHECKMINOR2IF %IMINORV2% GEQ %MINORV2% (goto UPDATE) ELSE (goto CHECKMINOR3):CHECKMINOR3IF %IMINORV3% GTR %MINORV3% (goto UPDATE) ELSE (goto CHECKMINOR3b):CHECKMINOR3bIF %IMINORV3% EQU %MINORV3% (goto DONE) ELSE (goto FAIL):FAILecho.echo Something is wrong ...echo Maybe the installed is newer thanecho the one we are installing?echo.echo %computername% (%USERNAME%) FAILED to install Flash Player - Installed version %MAJORV%.%MINORV1%.%MINORV2%.%MINORV3% and the latest version %LATESTVERSION% on %DATE% at %TIME% >> \\SOMEWHERE\FlashInstallLog.txtecho.goto DONE:UPDATEECHO c:\Windows\%SYSTYPE%\Macromed\Flash\%FLASHUNINST% -uninstallREM Install ...msiexec /i %LOGONSERVER%\NETLOGON\flashplayer\install_flash_player_%IMAJORV%_plugin.msi /quietmsiexec /i %LOGONSERVER%\NETLOGON\flashplayer\install_flash_player_%IMAJORV%_active_x.msi /quietREM Leave a breadcrumbs filedate /t > c:\Windows\%SYSTYPE%\Macromed\Flash\DA-FlashPlayer-Installed-%LATESTVERSION%.txt && time /t >> c:\Windows\%SYSTYPE%\Macromed\Flash\DA-FlashPlayer-Installed-%LATESTVERSION%.txtREM CleanupDEL c:\Temp\flashuninst.txtecho %computername% (%USERNAME%) succeeded in installing Flash Player - Installed version was %MAJORV%.%MINORV1%.%MINORV2%.%MINORV3% updated to %LATESTVERSION% on %DATE% at %TIME% >> \\SOMEWHERE\FlashInstallLog.txtGOTO DONE:DONEREM Goodbye!REM pause