Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Try {
  2.  
  3. $Keys=Get-ChildItem HKCR:Installer -Recurse -ErrorAction Stop | Get-ItemProperty -name ProductName -ErrorAction SilentlyContinue
  4.  
  5. }
  6.  
  7. Catch {
  8. New-PSDrive -Name HKCR -PSProvider registry -Root HKEY_CLASSES_ROOT -ErrorAction SilentlyContinue | Out-Null
  9. $Keys=Get-ChildItem HKCR:Installer -Recurse | Get-ItemProperty -name ProductName -ErrorAction SilentlyContinue
  10. }
  11.  
  12. Finally {
  13. foreach ($Key in $Keys) {
  14.  
  15. if ($Key.ProductName -like "*Flash*Plugin") {
  16.  
  17. Remove-Item $Key.PSPath -Force -Recurse
  18.  
  19. }
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement