Tuesday, October 18, 2011

Deploy Adobe Flash over Existing Versions

2. Download appropriate MSI packages for newest version
3. Create GPO

Seems easy right? Except the MSI installer has issues overwriting the C:\WINDOWS\system32\Macromed\Flash\***.ocx file for versions of flash prior to 11. I searched high and low to resolve this issue and the only thing that I found that worked (and could be scaled) was running the Flash player uninstaller, which of course is only comes in the executable flavor.

My new plan was to create a startup script to run the uninstaller, but then I realized we would have flash player being uninstalled and reinstalled on every reboot - not very efficient use of resource.

I did some testing and found the registry keys for Flash Player 11 (11 was current version at time of writing this) were stored in a different key than previous versions. I created the below startup script to check for previous versions and then run uninstaller and we were all set!

REM *********************************************************************
REM Environment customization begins here. Modify variables below.
REM *********************************************************************

REM Setting Adobe Flash Product Name
set ProductName=Adobe Flash Player Plugin

REM *********************************************************************
REM Deployment code begins here. Do not modify anything below this line.
REM *********************************************************************

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
if %errorlevel%==1 (goto UninstallFlash) else (goto End)

start \\\NETLOGON\Files\AdobeFlash\uninstall_flash_player_32bit.exe -uninstall

REM If 0 or other was returned, the product was found or another error occurred. Do nothing.


No comments: