Skip to content

Instantly share code, notes, and snippets.

@dominikbucher
Created April 13, 2023 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dominikbucher/0134ef7aacf3f7738253b8874ddf6d49 to your computer and use it in GitHub Desktop.
Save dominikbucher/0134ef7aacf3f7738253b8874ddf6d49 to your computer and use it in GitHub Desktop.
Uninstall Native Instruments Plugins using PowerShell
# Uninstalls all Native Instruments Plugins on Windows
# ====================================================
# NI plugins can quickly get a bit out of hand, as there are so many of it. The officiall uninstall
# instructions are to do it manually via program manager, this does the same but speeds up the
# process slightly.
# Note that this simply calls all the uninstallers after you confirmed it. Meaning you still have to
# click through the uninstallers, but at least not manually start them.
$uninstallKeys = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*
$uninstallKeys += Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*
foreach ($key in $uninstallKeys) {
if ($key.DisplayName -and $key.DisplayName -like "*Native Instruments*" -and (![string]::IsNullOrWhiteSpace($key.DisplayName.Trim()))) {
$uninstallString = $key.UninstallString
if ($uninstallString) {
$programName = $key.DisplayName
$confirm = Read-Host "Do you want to uninstall $programName ? (Y/N)"
if ($confirm.ToLower() -eq "y") {
Start-Process ($uninstallString -split " REMOVE")[0]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment