Uninstall the Splunk Forwarder in Windows using BigFix

From RiceFamily Wiki
Jump to: navigation, search

The UninstallString that Splunk stores in the Registry will not perform a Silent Uninstall of the Universal Forwarder. We need to add the /qn switches to the command. Before we can do that successfully, we will need to strip the NULL character off the end of the string.


(IF (x64 of Operating System) THEN ((substring before "%00" of ((Value "UninstallString" of Key whose (Value "DisplayName" of it as string as lowercase = "universalforwarder") of Key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of x64 Registry) as string)) & " /qn") ELSE ((substring before "%00" of ((Value "UninstallString" of Key whose (Value "DisplayName" of it as string as lowercase = "universalforwarder") of Key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of x86 Registry) as string)) & " /qn"))