|
Rickym61 -> RE: WQL Query to find an application not in ADD/Remove (10/3/2008 7:01:29 AM)
|
Might be easier to do the following. #1 Create a collection for all machines with the patch showing in Add/Remove #2 Create a collection with all machines, but do not show those with the patch installed #1 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 "%KB946983%" order by SMS_R_System.OperatingSystemNameandVersion #2 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.ProdID = "{90120000-0011-0000-0000-0000000FF1CE}" and SMS_R_System.ResourceId not in (select ResourceID from SMS_CM_RES_COLL_P0001340) The above uses a subselect to not shows machines from a certain collection i.e. #1 I did this to install a load of Hotfixes for Office 2007, but had to make sure they didnt have a certain patch installed. It has worked a treat for me. Might get the SQL guru aka #2 provide you with a better query, but the above should work.
|
|
|
|