Last active
February 15, 2022 22:08
-
-
Save wise-io/225087cb11a5c49d603bde0002f9350c to your computer and use it in GitHub Desktop.
Silently Uninstall WPS Office User Installations
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 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