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

Comments

Please log in to comment

Answers

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

Answered 04/24/2013 by: bkelly
Red Belt

Please log in to comment
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"
}

}

 

Answered 04/25/2013 by: Ifan
Second Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity