Skip to content

Instantly share code, notes, and snippets.

@wise-io
Last active February 13, 2022 21:05
Show Gist options
  • Save wise-io/5f25fd15ccc8a9281a819a9cb2c13bec to your computer and use it in GitHub Desktop.
Save wise-io/5f25fd15ccc8a9281a819a9cb2c13bec to your computer and use it in GitHub Desktop.
Silently Uninstalls Apple QuickTime (x32 & x64)
# Removes Apple QuickTime
$Paths = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
$App = Get-ChildItem -Path $Paths | Get-ItemProperty | Where-Object { $_.DisplayName -match 'quicktime' } | Select-Object -Property DisplayName, UninstallString
foreach ($Ver in $App) {
if ($Ver.UninstallString) {
$DisplayName = $Ver.DisplayName
$Uninst = $Ver.UninstallString -replace '/I', '/x '
Write-Output "Uninstalling $DisplayName..."
cmd /c $Uninst /qn
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment