Find systems with 2 programs

This WQL query shows systems with both Shockwave player 11 and Shockwave Player 12.
[WQL code]

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 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 Like "%Shockwave Player 11%") 
and SMS_R_System.ResourceId 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 Like "%Shockwave Player 12%")
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s