Uninstall software distribution in bigfix 7.2

(imported topic written by pacifiermax)

Hi all, can anyone tell me what is the best approach to uninstall a software by using bigfix? please note that previously we did the software installation manually.

I tried using Software distriubtion wizard, but it seems it cater for installation rather than uninstallation.

thanks!

(imported comment written by SystemAdmin)

Assuming the platform is Windows.

The HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall branch of the Registry usually contains the Uninstall commands for installed applications. If the application you wish to uninstall was installed via and MSI or appropriate Setup.exe method, you should be able to locate the uninstall commands.

As an Example, I have the Citrix Receiver installed on my computer, so I have the following registry key …

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{655C5545-7974-443F-882F-D745607EBB08}

with these values (among others) defined …

DisplayName = “Citrix Receiver(DV)”

UninstallString = “MsiExec.exe /X{655C5545-7974-443F-882F-D745607EBB08}”

in an action script I might then specify …

waithidden “{pathname of system folder}\msiexec.exe” /qn /X{"%7b655C5545-7974-443F-882F-D745607EBB08%7d"}

Note : The { and } characters in the UninstalLString are replaced with %7b and %7d to because the { & } characters are used for relevance evaluations in tasks, ie “{pathname of system folder}”.

(imported comment written by pacifiermax)

Hi Tim, thanks for the reply…

under my Citrix online uninstallString, it is MsiExec.exe /I{199C20D6-10D3-4210-B361-4760209F56AE}, i notice there is an /I instead of /X, i understand that /I are meant for installation, do I still follow to be /I or change it to /X ?

and for the key ( {199C20D6-10D3-4210-B361-4760209F56AE} ), this is a Citrix online plug-in (web) on my computer, does this key is same for other PCs? regardless OS platform?

thanks!

(imported comment written by SystemAdmin)

The string {199C20D6-10D3-4210-B361-4760209F56AE} is a GUID (or Globally Unique ID) and, as I understand them, will be different for each version of the application.

The GUID is actually generated when the MSI is created by the developer not when the software is installed. You could write a fixlet/task to look for the GUID under the Uninstall string, and you should see multiple systems showing relevant. You could then simply hard code the GUID into the MSIexec command line to uninstall the product.

If the same version of the installer is used across OS’s (WinXP, Vista, Win7, etc) it should keep the same GUID.

A different version (xxx.01 vs xxx.02) of the Citrix client installer will have a different GUID.

A better way to handle the uninstall would be to use Substitution in the action so that the Fixlet/task doesn’t care what the GUID is. Keep in mind that I created the relevance clause below based on a test install of the latest Citrix plugin, you might need to adjust the strings to fit your situation. I suggest you include Relevance to determine versions as well. I omitted a version check for my testing and simply used it to uninstall the first instance of the Citrix Web Plug-in.

(name of key whose (exists value “DisplayName” of it AND value “DisplayName” of it as string as lowercase starts with “citrix” AND value “DisplayName” of it as string as lowercase ends with “plug-in (web)”) AND ((value “DisplayVersion” of it) = “12.x.x.x”)) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry)

The above will evaluate to a value of “{199C20D6-10D3-4210-B361-4760209F56AE}” which is the GUID that needs to be uninstalled. Combine this with Action Script substitution and …

waithidden “{pathname of system folder}\msiexec.exe” /qn /x{(name of key whose (exists value “DisplayName” of it AND value “DisplayName” of it as string as lowercase starts with “citrix” AND value “DisplayName” of it as string as lowercase ends with “plug-in (web)”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry)}

According to the logs on my workstation, this evaluated to …

waithidden “C:\Windows\system32\msiexec.exe” /qn /x{199C20D6-10D3-4210-B361-4760209F56AE}