Script to remove old flash player silently ?

I looking for a simple script, that disables Flash player automatic updates and notifies. And how do I remove old flash player silently with a script ? Because I cannot run over the old flash with the new one.

Comments

Community Chosen Answer

1

Just download their uninstaller and run it with a -uninstall switch, it will run silently. We just wrap it in a winbatch exe, that also follows with the install of the latest version...They make and uninstaller for 32 and 64 bit. Easy peasy!

Also, best way to thwart updates is with a GPO that disables this service AdobeFlashPlayerSvc, why use a screw driver when you can use a hammer. :) We use the "hammer" GPO because we are in a very large Gov't environment and need strict control of updates, etc.

$Flashutil = (Get-Childitem C:\Windows\system32\Macromed\Flash\FlashUtil32*ActiveX.exe -name)$FlashTest = (Test-Path C:\Windows\system32\Macromed\Flash\FlashUtil32*ActiveX.exe)$Flashutil1 = (Get-Childitem C:\Windows\system32\Macromed\Flash\FlashUtil32*Plugin.exe -name)$FlashTest1 = (Test-Path C:\Windows\system32\Macromed\Flash\FlashUtil32*Plugin.exe)#These are the GUIDs of each version of FlashPlayer and they can be found by Searching "Flash Player" in this Key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\#There is one for the ActiveX and one for NPAPI Plugin#When Building a new Flash Plackage you just need to add the 2 new GUIDs to this list.$GUID = @("{87FB4D1F-413A-4F3F-AAD9-0B130A02BA61}","{1C1655A5-8B59-421E-ABCC-9182956510DC}","{A7DC9721-4986-4179-BB89-A3E99545584C}","{92C34178-B679-4C83-AC33-7EFCE6D36E01}","{0608F2B6-4E49-4AD0-9128-C122A34CFCE1}","{7B0961DB-15EB-41AF-85DA-C296924CA408}","{7898389E-2B8F-4CAC-A8CB-489B7B339C03}","{56680CC0-AA4D-47DB-A1A3-B26A97F1D3F1}","{FB7D053D-9F6F-4E16-96BE-D2EF54C620AC}","{8B4393AD-53A8-4895-803D-3AEECD99D620}","{D21D7AFD-8DF3-4EF0-B81B-A2AA5AEFE713}","{0C942CD9-6F38-498A-808F-C76EDBBA1969}","{89D2A20B-74C2-4A70-B598-AA4F4DFC0EBF}","{0608F2B6-4E49-4AD0-9128-C122A34CFCE1}","{1F427911-1A3C-4264-967B-7DE6070FD8FC}","{FDAF247B-4ADD-4089-A799-B08206B8E75C}","{AC08189D-DBCB-40DB-8B36-0AC5F1B115BD}","{70F0F88A-387B-40EB-93BD-9877DB9D668D}","{A186F2B3-64FC-4A3C-8096-B002A71F2A9B}","{EE56217C-B3F9-402B-B4EC-63F090F51D3D}","{2F881898-5300-4D68-AE46-F5FE074D59AA}","{44CF4DB9-707A-4395-839C-573FBC206CB9}","{A6FB0BFC-1F3F-42E0-BEAB-FA139FB54812}","{A580818A-6519-4120-AB1C-F4F6FCFAA7D0}","{A4488E5C-1022-432A-8066-72E1C4023310}","{9F5C6A1A-3B30-4AD5-B998-2885AA7C26A7}","{2448A347-6E10-4FDE-AD25-74804743D184}","{901E9B21-CDB1-4C4A-ABFC-61A554912BED}","{B0069674-D80C-48CB-852D-88AD36EAB0A5}","{57B3953E-BB96-418D-9228-57B7082B921A}","{76CF5170-31B4-490F-89CE-5820EF416822}","{B3DADA45-F0ED-48FD-946E-7E82C2229D59}","{448D7DEC-36F1-4091-B419-C5487BDEB867}","{7AF47D49-5F6B-4646-84FA-5802C635B082}","{DE3DB02A-3402-4CC4-AF65-B52AE8406739}","{D10AEF4A-DD94-4F6C-9CBF-580C1A1F6D05}","{9755D61E-3FC8-479D-BAD7-5516E0FE5281}","{AD6E9D76-C6AA-4F6E-8DAE-4EEE78B78743}","{8656EDBE-7C0A-4945-8D49-493FDBE7B5BD}","{521CCA6C-F8FD-47ED-AF9A-2461352E34DD}","{0699CBD6-FFF5-4211-97A7-9C32E744F5F4}","{BD2339D5-5609-4DB0-A89F-D427B7B353E1}","{63A147A7-55F5-4305-A09C-696781D58B8A}","{5682D3D7-0E22-4AC5-8DAD-5375A1F7B313}","{BABDDB46-341A-460E-8F65-83C9B0BF7329}","{AA4C5C0F-AE8D-4760-A513-F2F3109D8C9E}","{A580818A-6519-4120-AB1C-F4F6FCFAA7D0}","{2755BEE9-F03B-4FB8-BB71-0BA3F2629F18}","{506B121D-1B93-484D-8241-6250BCB736C7}","{44C61B0B-3700-4AA6-AC7C-EE8F0BA9A907}","{4EF54F47-BD29-4049-AEAF-A80E494A6A45}","{F22C3C05-B1D9-47FF-AA17-4F9DCBFE850F}","{8C901387-B304-404D-93C0-E2E0C2D53D90}","{61F2FFE4-56BA-4F5E-91FB-BD34F92E44CE}","{B21D5938-6B90-408B-B827-92F6E0E11B48}","{70F97130-DBF6-4885-854C-CC7A80FC65E1}","{DC0C27E6-745B-4D0E-A2F7-47676BFAE25D}","{2BE0DC49-FA94-4853-A62A-F1E02ECAA67E}","{D901557E-8AF2-4F66-BE3C-B8C816397BD5}","{465571A6-29A2-4D39-B77D-3A1F6C964B65}","{1D55DE93-486D-40F7-88F3-CF08578F82AA}","{68BC8140-3FAA-4419-B6EE-CCF60BE6DAB2}","{10F0B906-1989-4F20-A93C-4C0F94C8DF9E}","{6CBBF19C-2B69-4143-81C4-D5B56D32088C}","{047904BA-C065-40D5-969A-C7D91CA93D62}","{BC8AC77D-6A6F-491F-BEED-2958F09C6CAE}","{AF82C1A9-56DC-4CCD-A36C-CAE56D541DFA}","{3CA17ADC-2146-49C2-A375-972BB57CF7F6}","{7C548501-3501-468A-A443-CC42F5B3626B}","{F1410A0A-8205-4D45-BF2B-9C7ACB2F4B24}","{C4B32291-F7B2-4BEC-BA4D-4195676A08CC}","{3FC9A6DE-C105-4576-8F63-656FFB1BF8EB}")

#These are the SIDs of each version of FlashPlayer and they can be found by Searching "Flash Player" in this Key: HKLM:\SOFTWARE\CLASSES\Installer\Features\.#There is one for the ActiveX and one for NPAPI Plugin.#When Building a new Flash Plackage you just need to add the 2 new SIDs to this list.$SID = @("F1D4BF78A314F3F4AA9DB031A020AB16","5A5561C195B8E124BACC1928595601CD","0418CB86AAF391446BEECC6FB06EAD2B","1279CD7A68949714BB983A9E595485C4","19223B4C2B7FCEB4ABD4145976A680CC","1E36145BD4A3BEE4189FAF44B9E3831B","39ED55D1D6847F04883FFC8075F828AA","4769600BC08DBC8458D288DA63AE0B5A","4EFF2F16AB65E5F419BFDB439FE244EC","54ADAD3BDE0FDF8449E6E7282C22D995","5E8B1F381BB60934C9712D391F430FEB","609B0F01989102F49AC3C4F0498CFDE9","6B2F806094E40DA419821C223AC4CF1E","87143C29976B38C4CA33E7CF6E3DE610","898188F2003586D4EA645FEF70D495AA","9BD4FC44A707593438C975F3CB02C69B","9DC249C083F6A89408F87CE6BDAB9196","A818085A91560214BAC14F6FCFAF7A0D","B02A2D982C4707A45B89AAF4D4CFE0FB","B0B16C4400736AA4CAC7EEF8B09A9A70","C5E8844A2201A2340866271E4C203301","C71265EE9F3BB2044BCE360F095FD1D3","C91FBBC696B23414184C5D5BD62380C8","CED7D8441F6319044B915C84B7ED8B76","CFB0BF6AF3F10E24EBBAAF31F95B8421","D350D7BFF6F961E469EB2DFE456C02CA","DFA7D12D3FD80FE48BB12AAAA5FE7E31","ED6A9CF3501C6754F83656F6BFB18FBE")

#This is calling the "Flashutil" application to attempt to uninstall the currently installed version of Flash Player.Write-Host "First Off we are going to politely ask Flash Player to remove itself.`r"

#When MSIEXEC is running it causes problems with the installation of Flash, there for I am having it forcivly end it, if it is running.Write-Host "Attempting to Terminate msiexec.exe`r"$Process = Get-Process msiexec -ErrorAction SilentlyContinueif ($Process -eq $True) {Stop-Process - msiexec -Force -ErrorAction SilentlyContinue}

}#I couldnt get this one to check whether the file exists because its a value instead of a key, so I am just suppressing errors and having it try to delete any of the versions.foreach ($GUIDS in $GUID) {$UIPath = "C:\Windows\Installer\$GUIDS\"Remove-ItemProperty -Path "hklm:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders" -name $UIPath -ErrorAction SilentlyContinue }

Write-Host "Deleted all the GUIDs that were present, now searching for and deleting SIDs. $(get-date -format `"yyyyMMdd_hhmmsstt`")`r"foreach ($SIDS in $SID) {

first of all, is FlashPlayer or Flashplayer Plugin are you trying to uninstall? Normally the new version should look after the uninatllation of old version but some time what happens with flash player Not plugin the .ocx file are missing in flash folder and will complain during the uninstall what i normmaly do is deploy a dummy files prior to new deplyment by using a batch file. example below. for 32 bit and also for 64 bit

Disabling Flash's auto-update function should be performed at the packaging/deployment level (depending on how you're deploying). It's documented to death on IT Ninja e.g. here and on Adobe's web site.

The MSI's Upgrade table contains the UpgradeCodes for versions from 6.0.0.0 up to (what I'm calling) the current version, 16.0.0.296. It should just work. If it doesn't, you may have to add the UpgradeCode from whatever MSI installed v15 for you and add it to the MSI you're currently using.

If that MSI doesn't contain an Upgrade table, it's not the official Adobe MSI and you will have to populate the Upgrade table yourself.

<< Flash installs are exe I think. >>
Adobe's packaging of Flash is a joke. The EXE that you download extracts and executes an MSI. Open the EXE with 7Zip and you'll see it there. However, the MSI simply extracts and executes yet another EXE.