Source: https://eksith.wordpress.com/2015/08/06/how-to-remove-flash-from-windows-10/
Script:
REM take ownership takeown /f C:\Windows\SysWOW64\Macromed\Flash\*.* takeown /f C:\Windows\System32\Macromed\Flash\*.* REM extend access cacls C:\Windows\SysWOW64\Macromed\Flash\*.* /E /T /G %UserDomain%\%UserName%:F cacls C:\Windows\System32\Macromed\Flash\*.* /E /T /G %UserDomain%\%UserName%:F REM delete del C:\Windows\SysWOW64\Macromed\Flash\*.* /Q del C:\Windows\System32\Macromed\Flash\*.* /Q rd C:\Windows\SysWOW64\Macromed\Flash rd C:\Windows\System32\Macromed\Flash rd C:\Windows\SysWOW64\Macromed rd C:\Windows\System32\Macromed del C:\Windows\SysWOW64\FlashPlayerApp.exe del C:\Windows\SysWOW64\FlashPlayerCPLApp.cplAlternative:
REM take ownership takeown /R /F C:\Windows\System32\Macromed takeown /R /F C:\Windows\SysWOW64\Macromed REM reset access icacls "C:\Windows\System32\Macromed" /T /Q /C /RESET icacls "C:\Windows\SysWOW64\Macromed" /T /Q /C /RESET REM delete del C:\Windows\System32\Macromed\Flash\*.* /Q rd C:\Windows\System32\Macromed\Flash rd C:\Windows\System32\Macromed del C:\Windows\SysWOW64\Macromed\Flash\*.* /Q rd C:\Windows\SysWOW64\Macromed\Flash rd C:\Windows\SysWOW64\Macromed del C:\Windows\SysWOW64\FlashPlayerApp.exe del C:\Windows\SysWOW64\FlashPlayerCPLApp.cpl