Created
April 13, 2023 21:25
-
-
Save dominikbucher/0134ef7aacf3f7738253b8874ddf6d49 to your computer and use it in GitHub Desktop.
Uninstall Native Instruments Plugins using PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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