Does anyone see anthing that is wrong with this relevance? I have an MSSQL service and if I look at the version of the executable that it is running, it is 2007.100.2531.0 and the relevance is coming back as false.
exists running service whose (service name of it as lowercase contains "sql" AND (login account of it as lowercase contains "xxx" or login account of it as lowercase contains "aaa" or login account of it as lowercase contains "bbb") AND (version of file (preceding texts of firsts " " of (expand environment strings of image paths of it))) >= "2005")
The problem is that the version number of the file contains 4 levels (major.minor.revision.build) and you’re not comparing it against the same number of levels. See my last comment in http://forum.bigfix.com/viewtopic.php?id=6365
Pad the version number of the service you’re retrieving (just in case) and compare it against “2005.0.0.0”, not just “2005”.
exists running service whose (service name of it as lowercase contains “sql” AND (login account of it as lowercase contains “xxx” or login account of it as lowercase contains “aaa” or login account of it as lowercase contains “bbb”) AND pad of (version of file (preceding texts of firsts " " of (expand environment strings of image paths of it))) >= “2005.0.0.0” as version)
version of file (preceding texts of firsts " " of (expand environment strings of image paths of it)) of running service whose (service name of it as lowercase contains “sql” AND (login account of it as lowercase contains “xxx” or login account of it as lowercase contains “aaa” or login account of it as lowercase contains “bbb”))
versions of files ((substring between “%22” of expand environment strings of image paths of it) of running services whose (service name of it as lowercase contains “sql” AND (login account of it as lowercase contains “xxx” or login account of it as lowercase contains “aaa” or login account of it as lowercase contains “bbb”)))
I think your problem might be that you’re taking to the left of the last blank. Taking between double-quotes might be better.
If so, then this might work better (assuming every image path for sql contains double-quotes)
exists running services whose (service name of it as lowercase contains “sql” AND (login account of it as lowercase contains “xxx” or login account of it as lowercase contains “aaa” or login account of it as lowercase contains “bbb”) AND pad of (versions of files (substring between “%22” of expand environment strings of image paths of it)) >= “2005.0.0.0” as version)
So then it might be up to you to use pad of() if all of the sql services always contains major.minor.revision.build. But you’d still need to compare against “2005.0.0.0”