
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
Find my microsoft office product key 2016 code#
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.
