This PowerShell script removes KingSoft WPS Office user-based installs from a Windows computer. It first gets a list of all installed programs from the HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall registry key, filters it to only include programs published by Kingsoft, and then selects the DisplayName and UninstallString properties.

Next, it iterates over each program in the list and checks if it has an UninstallString value. If it does, it assigns the DisplayName and UninstallString values to variables and outputs a message saying it’s uninstalling the program. It then executes the UninstallString using the cmd /c command with the /s switch to run the uninstaller silently without user interaction.

This script should only be used if you’re sure that you want to remove all KingSoft WPS Office user-based installs from your computer, as it will remove them all without confirmation.

# Removes KingSoft WPS Office User Based Installation

$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

  }

}

By amit_g

Welcome to my IT Infra Blog! My name is Amit Kumar, and I am an IT infrastructure expert with over 11 years of experience in the field. Throughout my career, I have worked with a wide variety of systems and technologies, from network infrastructure and cloud computing to hardware and software development. On this blog, I aim to share my knowledge, insights, and opinions on all things related to IT infrastructure. From industry trends and best practices to tips and tricks for managing complex systems, my goal is to provide valuable information that will help IT professionals and enthusiasts alike. Whether you are a seasoned IT veteran or just getting started in the field, I hope you will find my blog to be a valuable resource. In addition to sharing my own thoughts and ideas, I also welcome feedback, comments, and questions from my readers. I believe that a collaborative approach is the best way to advance the field of IT infrastructure and I look forward to hearing from you. Thank you for visiting my blog, and I hope you will continue to follow along as I explore the fascinating world of IT infrastructure. Sincerely, Amit Kumar

Leave a Reply

Your email address will not be published. Required fields are marked *