Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Universal MSI uninstaller for Zoom "All Users" SYSTEM version x86
- # these is no x64 version that I know of.
- # This doesn't cover per-user installs (the EXE).
- # - JT
- $AppName = "Zoom"
- # Sweep installed apps and pull the uninstall string.
- # This is meant to solve the problem of uninstalling auto-patched apps. with automation.
- # Any patches will change the GUID, so we want to run msiexec against that dynamically.
- # The config manager client can unisntall with this script, with no regard to the version that's actually installed.
- # This was tested on 4.x and 5.x MSIs.
- ##################################################################
- # Kill running instanced of this app. Lots of helper apps live in the background...
- $AppPath = (${env:ProgramFiles(x86)} + "\Zoom\bin\*")
- Get-Process | ? {$_.path -like $AppPath } | % {$_ | Stop-Process -Force -Verbose}
- #######################################################
- ## Look for specific architecture:
- $UninstallRoot = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
- #$UninstallRoot = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
- # Find the first app which matches the name. Be careful to make it find the correct one, in case more than one app matches.
- # ! ! ! no wildcards this time.
- $AppInfo = Get-ChildItem -Path $UninstallRoot | Where-Object {$_.getValue("displayname") -eq ($AppName)} | Select-Object -First 1
- $Version = $AppInfo.GetValue("DisplayVersion")
- $LogFile = $env:TEMP + $AppName + "_" + $Version + "-Uninstall.log"
- $AppGuid = $AppInfo.PSChildName
- # With all this information, run the uninstall command.
- & MsiExec /x $AppGuid /q /norestart /log $LogFile | Wait-Process
Add Comment
Please, Sign In to add comment