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.
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âŚ
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
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.
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
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
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
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