I was recently required to do an audit of Office software for Microsoft licensing and noticed the SCCM WQL queries did not pick up 64 bit installs of Microsoft Office. After a bit of investigation I read that the normal queries which work (as below) only detect 32 bit software installs.
Credit to skissinger from my IT forum for this info: http://www.myitforum.com/forums/Queries-for-32bit-amp-64bit-in-addremove-programs-m232862.aspx
32 bit software query:
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 = "Microsoft Office professional plus 2013"
64 bit software query:
It's probably the inner joins; because a x86 box won't have any 64 stuff; so nothing to join on. Just make it easier:
select SMS_R_System.Name from SMS_R_System
where resourceid in (select resourceid from SMS_G_System_ADD_REMOVE_PROGRAMS_64 where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like "Adobe Flash Player%")
or
select SMS_R_System.Name from SMS_R_System
where resourceid in (select resourceid from SMS_G_System_ADD_REMOVE_PROGRAMS where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "Adobe Flash Player%")
Credit to skissinger from my IT forum for this info: http://www.myitforum.com/forums/Queries-for-32bit-amp-64bit-in-addremove-programs-m232862.aspx
32 bit software query:
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 = "Microsoft Office professional plus 2013"
64 bit software query:
It's probably the inner joins; because a x86 box won't have any 64 stuff; so nothing to join on. Just make it easier:
select SMS_R_System.Name from SMS_R_System
where resourceid in (select resourceid from SMS_G_System_ADD_REMOVE_PROGRAMS_64 where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like "Adobe Flash Player%")
or
select SMS_R_System.Name from SMS_R_System
where resourceid in (select resourceid from SMS_G_System_ADD_REMOVE_PROGRAMS where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "Adobe Flash Player%")
Comments
Post a Comment