Quick post – I needed to query for 64-bit versions of Microsoft Office installed on our clients. Usually, the 32-bit version gets installed as this is Microsoft’s recommendation due to add-in compatibility etc. But in some cases, the 64-bit version is required to take advantage of additional RAM. I couldn’t find anything useful online to distinguish between the x86 and x64 versions of Office using inventory data from ConfigMgr, but I found that the product code GUID of the Office product actually contains this information (see here).
So I put together the following SQL query which extracts some additional data about Office from the GUID, including the Release Version (ie RTM, SP1 etc), Release Type (ie Volume License, Trial etc) and the Bit Version.
This should work for any version of Office, but only for the MSI installer (ie not Click-to-Run).
Some example results:
Select sys.Name0 as 'Device Name', sof.ProductName0 as 'Product Name', sof.ProductVersion0 as 'Product Version', sof.InstallDate0 as 'Installation Date', sof.Language0 as 'Language Code', sof.SoftwareCode0 as 'Software Code', 'Release Version' = Case substring(sof.SoftwareCode0,2,1) When '0' Then 'Prior to Beta 1' When '1' Then 'Beta 1' When '2' Then 'Beta 2' When '3' Then 'RC0' When '4' Then 'RC1 / OEM Preview' When '9' Then 'RTM' When 'A' Then 'SP1' When 'B' Then 'SP2' When 'C' Then 'SP3' Else 'Unknown' End, 'Release Type' = Case substring(sof.SoftwareCode0,3,1) When '0' Then 'Volume License' When '1' Then 'Retail / OEM' When '2' Then 'Trial' When '5' Then 'Download' Else 'Unknown' End, substring(sof.SoftwareCode0,4,2) as 'Major Version', substring(sof.SoftwareCode0,6,4) as 'Minor Version', 'Bit Version' = Case substring(sof.SoftwareCode0,21,1) When '0' Then '32-bit' When '1' Then '64-bit' Else 'Unknown' End from v_GS_INSTALLED_SOFTWARE sof inner join v_R_System sys on sof.ResourceID = sys.ResourceID where sof.SoftwareCode0 like '%0ff1ce%' -- Querying for Office Professional Plus -- and sof.ProductName0 like '%Professional Plus%' -- Querying for 64-bit Office (0 = x86, 1 = x64) -- and substring(sof.SoftwareCode0,21,1) = 1 Order by sys.Name0