Skip to content

Instantly share code, notes, and snippets.

@wise-io
Last active February 15, 2022 22:08
Show Gist options
  • Save wise-io/225087cb11a5c49d603bde0002f9350c to your computer and use it in GitHub Desktop.
Save wise-io/225087cb11a5c49d603bde0002f9350c to your computer and use it in GitHub Desktop.
Silently Uninstall WPS Office User Installations
# Removes WPS (Kingsoft) Office User Based Installs
$App = Get-ChildItem -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.Publisher -like 'Kingsoft*' } | Select-Object -Property DisplayName, UninstallString
foreach ($Ver in $App) {
if ($Ver.UninstallString) {
$DisplayName = $Ver.DisplayName
$Uninst = $Ver.UninstallString
Write-Output "Uninstalling $DisplayName..."
cmd /c $Uninst /s
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment