Created
July 7, 2022 21:33
-
-
Save wise-io/13e02861b04073079957d7277e40d768 to your computer and use it in GitHub Desktop.
Uninstalls Microsoft Silverlight
This file contains 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
# Removes Microsoft Silverlight (x32 & x64) | |
$Paths = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall' | |
$App = Get-ChildItem -Path $Paths | Get-ItemProperty | Where-Object { $_.DisplayName -like 'Microsoft Silverlight' } | Select-Object | |
foreach ($Ver in $App) { | |
if ($Ver.UninstallString) { | |
$DisplayName = $Ver.DisplayName | |
$Uninst = $Ver.PSChildName | |
Write-Output "Uninstalling $DisplayName..." | |
cmd /c msiexec.exe /qn /uninstall $Uninst | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment