CM running current branch 2006
would like to create a collection based on a query of CCM_Application.ID and need some help creating the query.
To date I have worked with Queries that search Add Remove programs or existence of files with query strings 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_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceID where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "ESET Management%"
Unfortunately, I work with many Script based installers that do not update the Add remove programs and thus the above query is of no use.
Internally, CM records each application with a CI Unique Id which you will see in client logs such as AppIntentEval, DCMAgent, AppDiscovery and AppEnforce etc.
If you turn on the "CI Unique ID" column in the Console->Software Library->Applications you will see the CCM_Application.ID in column CI Unique. eg.
Walking through WMI on the client computer with WMI Explorer you can find the relevant applications available or installed on the client:
WMI Explorer
NameSpace: ROOT\ccm\ClientSDK
Class: CCM_Application
SELECT * FROM CCM_Application WHERE Id='ScopeId_A5D88389-7CC4-4728-9618-E26675CEB365/Application_f129454b-d7f8-4182-809c-90ab0e69ca4e' AND IsMachineTarget=true AND Revision='1' AND InstallState = 'Installed'
Is it possible to create a collection query to find computers with the above string