/build/static/layout/Breadcrumb_cap_w.png

SCCM query for two different versions of an installed application

Looking for how to write a WQL query that looks for either version A OR version B of an installed application. In my example below, I'm looking for the SAS Enterprise Guide executable, and I want to build a collection of computers that have either version 4.2 OR 4.3 installed.

I know I can write it like this:

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceId = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "SEGuide.exe" and SMS_G_System_SoftwareFile.FileVersion like "4.2%"

I can then make a second query, replacing "4.2" with "4.3", and then building a collection that includes both of those queries.

Just wondering if there's a way to include both versions into the same query.




0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: rileyz 4 years ago
Red Belt
0

Top Answer

Have you tried chopping off the .version so the wild card is earlier?

ie
SMS_G_System_SoftwareFile.FileVersion like "4.2%"
SMS_G_System_SoftwareFile.FileVersion like "4.%"


Comments:
  • Good thinking. That works--I was just curious if there was a way to incorporate unlike file versions (say, like version 7 or version 8, for example). - RonW 4 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ