Bigfix Software Deployment If statements

We are being asked again to push out an update version of the Qualys CloudAgent. The issue this time is that upon their testing they found out that if it already has a client installed on the server it needs different parameters than a fresh install. Current install parameter is:
QualysCloudAgent.exe CustomerId={{IDofCustomer} ActivationId={{activation ID} WebServiceUri=https://qagpublic.qg2.apps.qualys.com/CloudAgent/ >> “{parameter “logFolder”}{parameter “logFile”}”

The other Paramater just has to append the origional string with “PatchInstall=True” after the qualyscloudagent.exe

Can I have just one software deployment that would append the “PatchInsaall=True” if it found in the registry the regapp “Qualys Cloud Security Agent” with a version less than 4.8.0.31?

Thanks

Yes, But…

It’s unlikely you’d have a regapp for it, you’d probably need to test a registry-based query. See whether this gives a True/False as expected

q: exists keys whose (value "DisplayName" of it as string = "Qualys Cloud Security Agent" and value "DisplayVersion" of it as string as version < "4.8.0.31") of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of native registry

If that works you could modify your install command as

QualysCloudAgent.exe CustomerId={{IDofCustomer} ActivationId={{activation ID} WebServiceUri=https://qagpublic.qg2.apps.qualys.com/CloudAgent/ {if exists keys whose (value "DisplayName" of it as string = "Qualys Cloud Security Agent" and value "DisplayVersion" of it as string as version < "4.8.0.31") of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of native registry then "PatchInstall=True" else ""} >> “{parameter “logFolder”}{parameter “logFile”}”

1 Like

Let me try this and I will report back

1 Like

Alternate method but still with @JasonWalker’s concept could be looking for the QualysAgent service

Q: exists service "Qualysagent" whose (version of it < "4.8.0.31")
A: True

QualysCloudAgent.exe CustomerId={{IDofCustomer} ActivationId={{activation ID} WebServiceUri=https://qagpublic.qg2.apps.qualys.com/CloudAgent/ {if exists service "Qualysagent" whose (version of it < "4.8.0.31") then "PatchInstall=True" else ""} >> "{parameter "logFolder"}{parameter “logFile"}"

1 Like