

SELECT MACHINE.NAME AS SYSTEM_NAME, USER.FULL_NAME AS FIELD_26, OS_NAME, (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=24187) AS MACHINE_CUSTOM_INVENTORY_0_24187, (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=24456) AS MACHINE_CUSTOM_INVENTORY_0_24456, (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=24305) AS MACHINE_CUSTOM_INVENTORY_0_24305, (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=24186) AS MACHINE_CUSTOM_INVENTORY_0_24186 FROM MACHINE LEFT JOIN ASSET ON ASSET.MAPPED_ID = MACHINE.ID AND ASSET.ASSET_TYPE_ID=5 LEFT JOIN USER ON USER.ID = ASSET.Applies to: Volume licensed versions of Office LTSC 2021, Office 2019, and Office 2016 (including Project and Visio)

You can build it through the wizard but hey if this works as a copy paste into your environment, awesome, stop wasting time working on this. Set colItems = objOS.ExecQuery("SELECT OSArchitecture FROM Win32_OperatingSystem")ĮlseIf(InStr(objItem.OSArchitecture,"64") > 0) ThenĪlso, dunno if this helps but this is the SQL for the License Checker that I run as a report. Set objOS = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") OReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue OReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath


OReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath64,strValueName,strValue OReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath64 Set WshShell = WScript.CreateObject("WScript.Shell") StrComputer & "\root\default:StdRegProv") GetKey = temper(prodloc) & "_" & temper(KeyLoc)Ĭonst strKeyPath64 = "SOFTWARE\Wow6432Node\TVG" Set objFSO = CreateObject("Scripting.FileSystemObject")įor i = LBound(arrKeys) To UBound(arrKeys)ĮlseIf(InStr(arrKeys(i),officeCDLine)) Then Requirements:Product Finder (now form Nirsfot)įirst thing we need to do is copy this VBS code into notepad and save it as keys.vbs Option Explicit Next a VBS writes the keys to the registry.įinally we tie it all together with custom inventory rules. They way this works is we find the keys using nirsoft's keyfinder program. I’ve been getting a lot of request for this in my trainings, so here it is.Īt the end of this post, you will have all the tools you need to track your Windows product keys and Microsoft office product keys.
