Solved

SCCM: How to create query to get all systems that have Acrobat Pro with specific version?

Posted on 2011-03-08
6
4,330 Views
Last Modified: 2013-11-21
With reference to SCCM, I need to create a query to get all the machines that have Acrobat Pro 9.4.2. Please mention the script and query design as well for my future reference.

Can anyone help me in this regard?
0
Comment
Question by:A1opus
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:socrates2012
ID: 35069793
For a WQL query, try this:

select distinct SMS_R_System.Name, SMS_G_System_SoftwareFile.FileVersion 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 = "Acrobat.exe" AND
SMS_G_System_SoftwareFile.FileVersion LIKE "9.4.2%"
0
 
LVL 4

Expert Comment

by:jhindson
ID: 35099037
You may also try this:

select * from SMS_R_System where SMS_R_System.ResourceID not in (select SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID from SMS_G_System_ADD_REMOVE_PROGRAMS where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Adobe Reader 10.0.1" and SMS_G_System_ADD_REMOVE_PROGRAMS.Version = "10.0.1")
Limit to collection: (your collection of healthy clients)
Notes: I would strongly recommend staying away from the ">", "<", "+" operators when dealing with version numbers. While there's a lengthy answer as to why, the quick answer is that things like 9.0.123 is not a real number (multiple decimal points).

From here:  http://myitforum.com/cs2/blogs/rbennett806/pages/collection-queries.aspx
0
 
LVL 2

Accepted Solution

by:
A1opus earned 0 total points
ID: 35100723
I tried y'all queries but couldn't get the correct result. So therefore I tried myself and ran the following query:

select distinct SMS_R_System.Name, SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName, SMS_G_System_ADD_REMOVE_PROGRAMS.Version from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "Adobe Acrobat 9 Pro - English, Fran?is, Deutsch" or SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "Adobe Acrobat 9 Pro - English, Francais, Deutsch" or SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Adobe Acrobat 9 Pro - English, Français, Deutsch" and SMS_G_System_ADD_REMOVE_PROGRAMS.Version = "9.4.2"
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 4

Expert Comment

by:jhindson
ID: 35102784
So did your query provide the correct results for you? I seem to remember being told the only reliable way to query software of a particular version is to use ADD_REMOVE_PROGRAMS, and it looks like that is what you ended up using. I would like to know if your query worked as expected.
0
 
LVL 2

Author Comment

by:A1opus
ID: 35106401
Yup, it gave me the perfect results and then by using same query I have made a dynamic collection as well. It is running awesome.
0
 
LVL 2

Author Closing Comment

by:A1opus
ID: 35499790
My own solution did
Work...
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Problem Description: Actually I found the below issue with some customers after migration from SMS 2003 to SCCM 2007 and epically if they change site code, some clients may appear in the console with old site code, plus old sites still appearing …
My previous article  (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_4466-A-beginners-guide-to-installing-SCCM2007-on-Windows-2008-R2-Server.html)detailed one possible method to get SCCM 2007 installed an…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now