The following WQL query statement can be used to list all workstations which do not have Microsoft Office 2007 SP2 installed.
To use you will need to create a new collection and add as a Membership Query Rule.
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 where SMS_R_System.ResourceId not in (select SMS_R_System.ResourceID 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 = "2007 Microsoft Office Suite Service Pack 2 (SP2)" or SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "2007 Microsoft Office Suite Service Pack 2 (SP2)") and SMS_R_System.Obsolete = 0 and SMS_R_System.Client = 1 and SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation%" and SMS_R_System.Name not in ("MACHINE NAMES","Machine Names")
How to create a new collection in SCCM
- With the Configuration manager Console window open
- Right-click the ‘Collections’ node and select ‘New Collection’
- Enter in an appropriate name for the collection, for example “Workstations Without Office 2007 SP2 installed”
- Click ‘Next’
- Click on the ‘Query Rule’icon (it looks like a yellow cylinder)
- Enter an appropriate name for the query and limit to your workstation collection (if required)
- Click on the ‘Edit Query Statement’ button
- Select the ‘Show Query Language’ button
- Delete any text already in the ‘Query Statement’ box and copy and paste the query above into the box
- Click ‘OK’ and then ‘OK’ to return to the New Collection Wizard
- Click ‘Next’,‘Next’,‘Next’ and then ‘Finish’
- You may need to refresh the collection before you’re able to see the clients listed, this is done by right-clicking on the new collection and selecting ‘Update Collection Membership’