Skip to content

Instantly share code, notes, and snippets.

@jacksoneyton
Created April 15, 2016 22:38
Show Gist options
  • Save jacksoneyton/0c49bae0659020a77a18556848b9b3e8 to your computer and use it in GitHub Desktop.
Save jacksoneyton/0c49bae0659020a77a18556848b9b3e8 to your computer and use it in GitHub Desktop.
$qtVer = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall |
Get-ItemProperty |
Where-Object {$_.DisplayName -match "quicktime" } |
Select-Object -Property DisplayName, UninstallString
ForEach ($ver in $qtVer) {
If ($ver.UninstallString) {
$uninst = $ver.UninstallString
$uninst = $uninst -replace "/I", "/x "
Start-Process cmd -ArgumentList "/c $uninst /quiet /norestart" -NoNewWindow
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment