How to accurately compare software version numbers in device collections?
When specifying the criteria in a device collection based on installed software and version numbers, I check if "Installed Software.Product Version is less than "19.2.50.16", as an example.
But the evaluation of that version number seems to be alphabetical instead of numerical. So version "19.2.6.0" for example would evaluate as false when it should be true. So I have to use dumb work-arounds in some of my version-based collections.
I'm wondering if there is a clearer method to use when performing software version number comparisons in collection queries?
Posted Feb 17, 2022, 3:26 PM UTC
Product version is NOT a number but a string. As such it will be treated that way within queries. Write your query to find all computers with product and version X then find all computer with product and are NOT version x.
That's one of my work-arounds. But that method doesn't handle future versions or other not yet known versions.
Collections are for deployment not reporting. For reporting use Sql queries, then there is a trick having sort correctly.
That's what I'm doing, setting up a collection for deploying. Deploying an app to every device that has version X.Y.Z or less of that app installed. Or a version between X.0 and X.Y. Depends on the software.
Now deployment types within an application are able to evaluate file version numbers numerically which is nice. Too bad this functionality doesn't extend to collections.