/build/static/layout/Breadcrumb_cap_w.png

msiexec command for uninstalling all versions of WinZip

I need to uninstall all versions of WinZip on a lot of computers. 

I'm looking for a msiexec command to uninstall all versions or commands for each versions.

So far I have a command just for version 9.0 - "msiexec /x {345A4F96-3451-4622-B9CE-20ADDFDBFC80} /qn /norestart"

Thanks.


0 Comments   [ + ] Show comments

Answers (2)

Posted by: bkelly 11 years ago
Red Belt
1

Checking the computers that have it installed will be the most reliable way to be sure you have the right GUIDs but you may also look to the "Inventory Records" for each of the versions in the Software Library for uninstall commands like this. http://www.itninja.com/software/winzip/winzip-1/16-89

Posted by: Ifan 11 years ago
Second Degree Green Belt
1

Not perfect, the GUID string replacement can be improved and some other small things, but this powershell script should work. It goes through everything registered in Add/Remove and uninstalls it based on it's uninstallstring GUID. It also checks if the uninstallation failed.

Only works with MSI's and i take no responsibility for what might happen if you use this :P
It MUST run in Powershell x86 if you're using a 64bit system. SCCM launches powershell x86 automatically if you call powershell.exe in the program.

function checkExit([int]$i)
{
if (($i -ne "0") -and ($i -ne "3010"))
{
[Environment]::Exit($i)
}
}

$MSISwitch = "/qn"
$OS = Get-WmiObject -Class Win32_OperatingSystem

if ($OS.OSArchitecture -eq "64-bit")
{
$Arch = "x64"
set-alias ps64 "$env:windir\sysnative\WindowsPowerShell\v1.0\powershell.exe"
$installedsoftware64 = ps64{Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object Publisher, DisplayName, DisplayVersion, UninstallString}
$installedsoftware32 = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object Publisher, DisplayName, DisplayVersion, UninstallString
$installedsoftware = $installedsoftware32 + $installedsoftware64
}
else
{
$Arch = "x86"
$installedsoftware = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object Publisher, DisplayName, DisplayVersion, UninstallString
}

Foreach ($Application in $InstalledSoftware)
{
If ($Application.Displayname -like "*WinZip*")
{
$UninstGUID = ($_.UninstallString -replace ".*{", "") -replace "}.*", ""
$Uninstall = start-process -filepath "msiexec.exe" -argumentlist "/x {$UninstGUID} ", $msiswitch -passthru -wait
checkExit($Uninstall.ExitCode)
Remove-Variable -name "Uninstall","UninstGUID"
}

}

 

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ