Service Exectuable Version

(imported topic written by cstoneba)

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")

(imported comment written by SystemAdmin)

Hi cstoneba,

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”.

-Paul

(imported comment written by cstoneba)

need a little help, this doesn’t seem to work but maybe I’m not doing it right.

…AND (pad of file (preceding texts of firsts " " of (expand environment strings of image paths of it)) as version) >= “2005.0.0.0” as version)

(imported comment written by SystemAdmin)

Try this:

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)

Paul

(imported comment written by cstoneba)

after using yours, the number of applicable clients have not changed from my original relevance.

(imported comment written by cstoneba)

Paul, I didn’t see an update in the number of relevance fixlets for this fixlet. Any ideas?

(imported comment written by SystemAdmin)

Hmm… What do you get when you execute this?

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”))

(imported comment written by cstoneba)

your code doesn’t contain any version comparison (ie >= 2005.0.0.0). Would that just be thrown on the end?

(imported comment written by SystemAdmin)

I pulled it out just to see what version your relevance is returning on the service executable. Just for debugging, not the final relevance.

(imported comment written by cstoneba)

got it. I threw your code into an anlysis, 654 applicable computers , all the results are “”.

(imported comment written by SystemAdmin)

How about this…

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”

Paul