this is a copy of a task I have for the Splunk Forwarder, I just put in your client name. It creates a batch file and logs the commands issued and results.
Relevance:
exists key whose (value "displayname" of it as string contains "Symantec Netbackup Client" 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
Action Script:
// Log setup
parameter "mainSWDLogFolder" = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter "mainSWDLogFolder"}"
parameter "logFile" = "SWD_DeploymentResults.log"
parameter "logFolder" = "{parameter "mainSWDLogFolder"}"
delete __createfile
createfile until __END__
echo %DATE% %TIME% >> "{parameter "logFolder"}/{parameter "logFile"}"
echo Action ID: {id of active action} >> "{parameter "logFolder"}/{parameter "logFile"}"
echo command: msiexec.exe /X {name of key whose (value "displayname" of it as string contains "Symantec Netbackup Client" 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} /S >> "{parameter "logFolder"}/{parameter "logFile"}"
set errorlevel=
msiexec.exe /X {name of key whose (value "displayname" of it as string contains "Symantec Netbackup Client" 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} /S >> "{parameter "logFolder"}/{parameter "logFile"}" 2>&1
set SWDExitCode=%errorlevel%
echo Return code: %SWDExitCode% >> "{parameter "logFolder"}/{parameter "logFile"}"
echo. >> "{parameter "logFolder"}/{parameter "logFile"}"
exit %SWDExitCode%
__END__
delete uninstall.bat
move __createfile uninstall.bat
waithidden uninstall.bat >> uninstall.log 2>&1
As trn said, you really should be using the Fixlet Debugger to make sure youâre issuing the correct commands and substitutions. Once you get the hang of it, youâll be able to use it for all kinds of future tasks.