Skip to content

Instantly share code, notes, and snippets.

@richardg867
Last active March 7, 2018 01:30
Show Gist options
  • Save richardg867/63a7a024d436f68bba744ccc94beba7b to your computer and use it in GitHub Desktop.
Save richardg867/63a7a024d436f68bba744ccc94beba7b to your computer and use it in GitHub Desktop.
PowerShell one-liner to remove the spam added to Windows file context menus after installing any of NCH Software's products. Related link (not mine): http://blog.lincomatic.com/?p=906
Get-ChildItem -Path "hkcu:\Software\Classes" | ForEach-Object { Get-ChildItem "Registry::$($_.Name)\shell\" -ErrorAction ignore | Where-Object { $_.Name.split("\")[-1] -like "NCH*" } | ForEach-Object { Remove-Item "Registry::$($_.Name)" -Recurse } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment