How to uninstall software from Bigfix action script

Hi Team, We need to uninstall netbackup client from Bigfix action script. Netback up is simply uninstalled manually by getting in to control panel and remove it from there. But I need to know how I can make this in an action script which can use the uninstaller from control panel and uninstall it silently without reboot? Please suggest.

This depends on how it was installed (MSI or EXE) But the easiest thing is to look in the Uninstall key of the registry and most packages have an “UninstallString” which details how Add remove programs does it (control pan)… you will find there are many uninstallers in bigfix for other products,.
I would suggest you take a look at those, copy one and modify it to suit your needs.

1 Like

Found the uninstaller key from registry which is as MsiExec.exe/I{0B1A79E2-B92A-44B0-9283-2816EC5401E6} and I am using the below mentioned action command in QnA to try it on a server where it exists:-1:

waithidden “MsiExec.exe/I{0B1A79E2-B92A-44B0-9283-2816EC5401E6}” /qn

But I am encountering error as
Relevance clause must be surrounded by { and } guards. please suggest.

Well you have run into one issue in that the msiexe /I actally installs your uninstaller needs to change the /I for a /X
Also there is plenty of documentation on how to escape the { but in essence you use {{ and it should work…

1 Like

Thank you Pete, and I got it working as mentioned below:-1:
waithidden MsiExec.exe /X "{{0B1A79E2-B92A-44B0-9283-2816EC5401E6}” /qn

Would you know the switch to perform unattended uninstallation as below mentioned action script requires manual intervention for confirmation of uninstall:-1:

waithidden “MsiExec.exe/I{0B1A79E2-B92A-44B0-9283-2816EC5401E6}” /qn

1 Like

I usually go for /quiet /norestart

I tried the above mentioned switches but action is taking too long and does not complete. Any idea?

Registry Source: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Display Name: netbackup

Application Guid: search for appGuid
And use below command to perform the Uninstallation

Uninstall Command String: msiexec.exe /x{appGuid} /quiet /norestart

you should be able to use the relevance in the action script directly, which will work for different versions.

exists key whose (value “displayname” of it as string contains “netbackup” of it and value “uninstallstring” of it as string as lowercase contains “msiexec”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry

and for the action script:
Wait msiexec.exe /X {name of key whose (value “displayname” of it as string contains “netbackup” of it and value “uninstallstring” of it as string as lowercase contains “msiexec”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry} /qn

You could try just putting /quiet, or /quiet /norestart, but /qn generally works.

1 Like

Yes, I did try using the GUID as suggested in the above command format but it took tool long to complete. Don’t know why as I am sure I am using the right GUID shared on the registry path for Symantec net back up.

I will try this now to check how it goes. Thank you for responding.

ok, Can you provide the error code from the BigFix Client log file which will help to narrow down the issue.
If no error code is reported. I would suggest to create on the Fly batch file and then give a try.

Error in logs:

At 22:19:24 +0800 - mailboxsite
Relevant - Symantec Netback up - Uninstall (fixlet:17063255)
At 22:19:24 +0800 -
ActionLogMessage: (action:17063255) Action signature verified for Execution
ActionLogMessage: (action:17063255) starting action
At 22:19:24 +0800 - actionsite
Command failed (Relevance substitution failed) wait {value “UninstallString” of keys whose (value "DisplayName” of it as string starts with “Symantec Netbackup Client” and value “uninstallstring” of it as string contains “msiexec”) of keys “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registries; x64 registries)} /S (action:17063255)
At 22:19:24 +0800 -
ActionLogMessage: (action:17063255) ending action
At 22:19:24 +0800 - mailboxsite
Not Relevant - Symantec Netback up - Uninstall (fixlet:17063255)

I have also tried the following:-1:

Relevant - Symantec Netback up - Uninstall (fixlet:17063239)
At 22:07:54 +0800 -
ActionLogMessage: (action:17063239) Action signature verified for Execution
ActionLogMessage: (action:17063239) starting action
At 22:07:55 +0800 - actionsite
Command failed (Relevance substitution failed) wait msiexec.exe /X {name of key whose (value “displayname” of it as string contains “netbackup” of it and value “uninstallstring” of it as string as lowercase contains “msiexec”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry} /qn (action:17063239)
At 22:07:55 +0800 -
ActionLogMessage: (action:17063239) ending action
At 22:07:55 +0800 - mailboxsite Not Relevant - Symantec Netback up - Uninstall (fixlet:17063239)

I am using the below as relevance :-1:
unique values of (values “UninstallString” of keys whose (((it contains “symantec net backup”) of (value “DisplayName” of it as string as lowercase)) and (it contains “symantec corporation”) of (value “Publisher” of it as string as lowercase)) of keys “HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall” of (registry ; native registry) as string)

Have you cut and pasted straight out of this forum? You’ve probably got smart quotes in there, not ‘proper’ quotes

Also, you really need to get the relevance the same in your actionscript

Apologies, I am using the below action script :-1:

wait msiexec /X {{value “UninstallString” of keys whose (value "DisplayName” of it as string starts with “Symantec Netbackup Client” and value “uninstallstring” of it as string contains “msiexec”) of keys “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registries; x64 registries)} /S

With relevance :-1:

unique values of (values “UninstallString” of keys whose (((it contains “symantec net backup”) of (value “DisplayName” of it as string as lowercase)) and (it contains “symantec corporation”) of (value “Publisher” of it as string as lowercase)) of keys “HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall” of (registry ; native registry) as string)

and waiting for the status as it is taking sometime to get to final status.

you don’t want to escape the { when you’re using it for relevance, you’d only use that when you’re specifying a value explicitly.

You really need to be testing this in the Relevance Debugger.

You have already told us the uninstall string is

MsiExec.exe/I{0B1A79E2-B92A-44B0-9283-2816EC5401E6}

Now you say the actionscript has

wait msiexec /X {{value “UninstallString” of keys whose (value "DisplayName” of it as string starts with “Symantec Netbackup Client” and value “uninstallstring” of it as string contains “msiexec”) of keys “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registries; x64 registries)} /S

so that will expand out to

wait msiexec /X {MsiExec.exe/I{0B1A79E2-B92A-44B0-9283-2816EC5401E6}} /S