Make sure you have your file inventory configured correctly.
SELECT VRS.ResourceID, VRS.ResourceType, VRS.Name0Please note i've used 'less than or equal to' in the above query if you want just less than remove the '='
FROM dbo.v_R_System AS VRS INNER JOIN
dbo.v_GS_SoftwareFile AS SF ON VRS.ResourceID = SF.ResourceID
WHERE SF.FileName = 'X.exe' AND SF.FileVersion <= 'x.x.x.x'
Also a different way to do the same. Create 2 queries
http://www.sccm-tools.com/tools/wqlqueries/WQLQueries-Colcompswithfile.html
Your query doesn't show version less than x - you have file = "x.x.x.xx.x" so it will only return the exact version specified.
ReplyDeleteYou're right. I've now updated the query. Thank you for commenting.
ReplyDelete