thank you windows 10 enterprise Microsoft Windows Product Key Retrieval Script (MWPKRS) ------------------------------------------------------------------------------------ Microsoft Windows RETAIL Product Key ------------------------------------------------------------------------------------ Product Name: Microsoft Windows 10 Enterprise Edition ID: Enterprise Product ID: 00359-90000-00002-AA129 Product Key: " CKFK9-QNGF2-D34FM-99QX2-8XC4K " Partial Product Key: 8XC4K Lic Type / Channel: 5 - Retail / RETAIL License Status: Licensed OEM: To Be Filled By O.E.M. ------------------------------------------------------------------------------------ 4.7.2015. 11:45:24
MWPKRS: 21150707.2 - 18:55 Alpha 21150707.2 - 18:55 Alpha IE & Default Product Key added to the "Additional Product Key(s)" section. License Channel code has been modified. License Family added This script has NOT been fully tested. This script has NOT been tested on Windows Vista, 8, or 10 This script has been tested on Windows 8.1 Pro by s1ave77 File: MWPKRS_21150707.2.vbs Code: ' Microsoft Windows Product Key Retrieval Script (MWPKRS) ' WinNT: v6+ ' 21150707.2 - 18:55 Alpha strMWPKRS = "MWPKRS: 21150707.2 - 18:55 Alpha" Const HKEY_LOCAL_MACHINE = &H80000002 Const HKEY_CURRENT_USER = &H80000001 Dim objShell Dim arrPKey(4) Set colNamedArguments = WScript.Arguments.Named strComputer = "." strUsername = "" strPWD = "" oFolderPath = 000 oFileName = "MSWPKRS-PKey.txt" strComputer = colNamedArguments.Item("ip") strUsername = colNamedArguments.Item("usr") strPWD = colNamedArguments.Item("pwd") strOutput = colNamedArguments.Item("output") Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") Set objSWbemServices = objSWbemLocator.ConnectServer(strComputer, "root\default", strUsername, strPWD) Set objWMIService = objSWbemLocator.ConnectServer(strComputer, "root\cimv2", strUsername, strPWD) Set objShell = CreateObject("WScript.Shell") Set oReg = objSWbemServices.Get("StdRegProv") Set objFSO = CreateObject("Scripting.FileSystemObject") qRegistry checkWinVer On Error Resume Next WMI_Win32OS WMI_SLP WMI_SLS WMI_Win32CS Select Case oFolderPath Case 000 '* default oDirPath = objShell.CurrentDirectory & "\" Case 101 '* SpecialFolders: Desktop oDirPath = arrDesktopFolder(0) & "\" Case 201 '* SpecialFolders: AllUsersDesktop oDirPath = arrDesktopFolder(1) & "\" Case 102 '* REG HKCU Desktop UserShellFolder oDirPath = arrDesktopFolder(2) & "\" Case 103 '* REG HKCU Desktop ShellFolder oDirPath = arrDesktopFolder(3) & "\" Case 202 '* REG HKLM CommonDesktop ShellFolder oDirPath = arrDesktopFolder(4) & "\" Case Else oDirPath = ".\" End Select If strOutput = "file" Then PKeyFile End If PKeyEcho Sub PKeyEcho WScript.Echo vbCR _ & vbTAB & " Microsoft Windows Product Key Retrieval Script (MWPKRS) " & vbCR & vbCR _ & "--------------------------------------------------------------------------------------" & vbCR _ & " Microsoft Windows " & strLicCT & " Product Key" & vbCR _ & "--------------------------------------------------------------------------------------" & vbCR _ & " " & strSLPName & vbCR _ & " " & strSLPDesc & vbCR _ & "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " & vbCR _ & "Product Name: " & vbTAB & strOSCaption & vbCR _ & "Edition ID: " & vbTAB & strRegEditionID & vbCR & vbCR _ & "Product ID: " & vbTAB & vbTAB & strOSSerialNumber & vbCR _ & "Product Key: " & vbTAB & vbTAB & " " & strProductKey & " " & vbCR _ & "Partial Product Key: " & vbTAB & vbTAB & strSLPPartialPKey & vbCR & vbCR _ & "License Family: " & vbTAB & vbTAB & strSLPLicenseFamily & vbCR _ & "License Channel / Type: " & vbTAB & " " & strLicChannelType & vbCR _ & "License Status: " & vbTAB & vbTAB & strSLPLicenseStatus & vbCR _ & "--------------------------------------------------------------------------------------" & vbCR _ & "--------------------------------------------------------------------------------------" & vbCR _ & "Additional Product Key(s): " & vbCR & vbCR _ & " HKLM.WinNT.CV.DigitalProductId:" & vbTAB & strProductKey & vbCR _ & " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " & vbCR _ & " WMI.SLP.PartialProductKey: " & vbTAB & vbTAB & strSLPPartialPKey & vbCR _ & " WMI.SLS.OA3xOriginalProductKey:" & vbTAB & strSLSOA3xOriginalProductKey & vbCR _ & " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " & vbCR _ & "Internet Explorer \ Registration [ Product Key ]: " & vbCR _ & " HKLM.MS.IE.Reg.DigitalProductId:" & vbTAB & strProductKeyIE & vbCR _ & " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " & vbCR _ & "Default Product Key: " & vbCR _ & " HKLM.WinNT.CV.DPK.DigitalProductId:" & vbTAB & strProductKeyDefault & vbCR _ & "--------------------------------------------------------------------------------------" & vbCR _ & "--------------------------------------------------------------------------------------" & vbCR _ & "WMI.CS.Manufacturer: " & vbTAB & strCSManufacturer & vbCR & vbCR _ & "OEM Information:" & vbCR _ & " Manufacturer:" & vbTAB & vbTAB & strRegOEMInfoManufacturer & vbCR _ & " Model:" & vbTAB & vbTAB & vbTAB & strRegOEMInfoModel & vbCR _ & "--------------------------------------------------------------------------------------" & vbCR _ & Now & vbTAB & vbTAB & vbTAB & strMWPKRS exportFilePKEY = MsgBox ("Save to file?" & vbCR & vbCR _ & "File: " & oDirPath & oFileName, vbYesNo, "MWPKRS: Microsoft Windows Product Key > Save to file?") Select Case exportFilePKEY Case 6, vbYes PKeyFile WScript.Quit Case 7, vbNo WScript.Quit End Select End Sub Sub PKeyFile '// Output to File: Set outputTXT = objFSO.OpenTextFile(oDirPath & oFileName, 2, True) outputTXT.WriteLine "" outputTXT.WriteLine " Microsoft Windows Product Key Retrieval Script (MWPKRS)" outputTXT.WriteLine "" outputTXT.WriteLine " --------------------------------------------------------------------------------------" outputTXT.WriteLine " Microsoft Windows " & strLicCT & " Product Key" outputTXT.WriteLine " --------------------------------------------------------------------------------------" outputTXT.WriteLine " " & strSLPName outputTXT.WriteLine " " & strSLPDesc outputTXT.WriteLine " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " outputTXT.WriteLine " Product Name: " & vbTAB & vbTAB & strOSCaption outputTXT.WriteLine " Edition ID: " & vbTAB & vbTAB & strRegEditionID outputTXT.WriteLine "" outputTXT.WriteLine " Product ID: " & vbTAB & vbTAB & strOSSerialNumber outputTXT.WriteLine " Product Key: " & vbTAB & vbTAB & " " & strProductKey outputTXT.WriteLine " Partial Product Key: " & vbTAB & strSLPPartialPKey outputTXT.WriteLine "" outputTXT.WriteLine " License Family: " & vbTAB & vbTAB & strSLPLicenseFamily outputTXT.WriteLine " Licence Channel / Type: " & vbTAB & " " & strLicChannelType outputTXT.WriteLine " License Status: " & vbTAB & vbTAB & strSLPLicenseStatus outputTXT.WriteLine " --------------------------------------------------------------------------------------" outputTXT.WriteLine " --------------------------------------------------------------------------------------" outputTXT.WriteLine " Additional Product Key(s): " outputTXT.WriteLine "" outputTXT.WriteLine " Registry: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" outputTXT.WriteLine vbTAB & vbTAB & "DigitalProductId:" & vbTAB & strProductKey outputTXT.WriteLine "" outputTXT.WriteLine " WMI.SLP.PartialProductKey: " & vbTAB & strSLPPartialPKey outputTXT.WriteLine " WMI.SLS.OA3xOriginalProductKey:" & vbTAB & strSLSOA3xOriginalProductKey outputTXT.WriteLine "" outputTXT.WriteLine " Registry: HKLM\SOFTWARE\Microsoft\Internet Explorer\Registration" outputTXT.WriteLine vbTAB & vbTAB & "DigitalProductId:" & vbTAB & strProductKeyIE outputTXT.WriteLine "" outputTXT.WriteLine " Registry: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DefaultProductKey" outputTXT.WriteLine vbTAB & vbTAB & "DigitalProductId:" & vbTAB & strProductKeyDefault outputTXT.WriteLine " --------------------------------------------------------------------------------------" outputTXT.WriteLine " --------------------------------------------------------------------------------------" outputTXT.WriteLine " WMI.CS.Manufacturer: " & vbTAB & strCSManufacturer outputTXT.WriteLine "" outputTXT.WriteLine " OEM Information:" outputTXT.WriteLine " Manufacturer:" & vbTAB & vbTAB & strRegOEMInfoManufacturer outputTXT.WriteLine " Model:" & vbTAB & vbTAB & vbTAB & strRegOEMInfoModel outputTXT.WriteLine " --------------------------------------------------------------------------------------" outputTXT.WriteLine " " & Now & vbTAB & vbTAB & vbTAB & vbTAB & strMWPKRS WScript.Quit End Sub Function checkWinVer 'Check Windows Version : If Not strRegWinVersion => 6.0 Then WScript.Echo "WINDOWS VERSION ERROR:" & vbCR & vbCR _ & " Microsoft Windows Product Key Retrieval Script (MWPKRS) " & vbCR _ & "-----------------------------------------------------------------" & vbCR _ & " This script requires Windows Version 6.0 ( Vista ) and above! " & vbCR _ & "-----------------------------------------------------------------" WScript.Quit End If End Function Dim strRegWinVersion, strRegEditionID Dim strProductKey Dim strProductKeyDefault, strProductKeyIE Dim strRegOEMInfoManufacturer, strRegOEMInfoModel Dim arrDesktopFolder(4) Sub qRegistry keyNTCurrentVersion = "SOFTWARE\Microsoft\Windows NT\CurrentVersion" keyWinCurrVerOEMInfo = "SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" ' Windows oReg.GetStringValue HKEY_LOCAL_MACHINE,keyNTCurrentVersion,"CurrentVersion",strRegWinVersion oReg.GetStringValue HKEY_LOCAL_MACHINE,keyNTCurrentVersion,"EditionID",strRegEditionID ' Product Key oReg.GetBinaryValue HKEY_LOCAL_MACHINE,keyNTCurrentVersion,"DigitalProductId",pidBinary strProductKey = fnDecipherMSKey(pidBinary) strPartialPK = Right("0" & strProductKey, 5) oReg.GetBinaryValue HKEY_LOCAL_MACHINE,keyNTCurrentVersion & "\DefaultProductKey","DigitalProductId",pidBinary strProductKeyDefault = fnDecipherMSKey(pidBinary) oReg.GetBinaryValue HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Internet Explorer\Registration","DigitalProductId",pidBinary strProductKeyIE = fnDecipherMSKey(pidBinary) ' OEM Information oReg.GetStringValue HKEY_LOCAL_MACHINE,keyWinCurrVerOEMInfo,"Manufacturer",strRegOEMInfoManufacturer oReg.GetStringValue HKEY_LOCAL_MACHINE,keyWinCurrVerOEMInfo,"Model",strRegOEMInfoModel ' Shell Folders keyHKCRUserShellFolders = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" oReg.GetStringValue HKEY_CURRENT_USER,keyHKCRUserShellFolders,"Desktop",strCUserDesktop keyHKCRShellFolders = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" oReg.GetStringValue HKEY_CURRENT_USER,keyHKCRShellFolders,"Desktop",strCUserDesktopSF keyHKLMShellFolders = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" oReg.GetStringValue HKEY_LOCAL_MACHINE,keyHKLMShellFolders,"Common Desktop",strCommonDesktopSF arrDesktopFolder = Array(objShell.SpecialFolders("Desktop"), _ objShell.SpecialFolders("AllUsersDesktop"), _ strCUserDesktop, strCUserDesktopSF, strCommonDesktopSF) End Sub Dim strOSCaption, strOSSerialNumber, strOSType Sub WMI_Win32OS ' Win32_OperatingSystem: Set colOS = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem",,48) For Each objOS in colOS ' Set variables gathered from Win32_OperatingSystem class: strOSCaption = objOS.Caption strOSSerialNumber = objOS.SerialNumber ' strOSSerialNumberX = Replace(objOS.SerialNumber,"-","XXXXX-",6,1) strOSType = objOS.OSType Next End Sub Dim strSLPName, strSLPDesc, strSLPLicenseFamily, strSLPPartialPKey Dim strLicChannelType, strSLPLicenseStatus Dim strLicCT Sub WMI_SLP ' SoftwareLicensingProduct: Set colSLP = objWMIService.ExecQuery("SELECT * FROM SoftwareLicensingProduct WHERE NOT PartialProductKey = null AND Description > 'Operating System'",,48) For Each objSLP in colSLP ' Set variables gathered from SoftwareLicensingProduct: strSLPName = objSLP.Name strSLPDesc = objSLP.Description strSLPLicenseFamily = objSLP.LicenseFamily strSLPPartialPKey = objSLP.PartialProductKey ' Get License Type / Channel from objSLP.Description: SLPDescLic = Split(strSLPDesc, ", ") strLicCT = Replace(SLPDescLic(1), " channel", "") Select Case strLicCT Case "OEM_DM" : strLicChannelType = strLicCT & " | OEM Digital Marker" Case "OEM_SLP" : strLicChannelType = strLicCT & " | OEM SLP" Case "OEM_COA_SLP" : strLicChannelType = strLicCT & " | COA : OEM SLP" Case "OEM_COA_NSLP" : strLicChannelType = strLicCT & " | COA : OEM System Builder" Case "RETAIL" : strLicChannelType = strLicCT & " | Retail" Case "VOLUME_MAK" : strLicChannelType = strLicCT & " | Volume MAK" Case "VOLUME_KMSCLIENT" : strLicChannelType = strLicCT & " | Volume KMS Client" Case "VOLUME_KMS" : strLicChannelType = strLicCT & " | Volume KMS Server" Case Else strLicChannelType = strLicCT End Select ' Get License Status from SoftwareLicensingProduct: Const HR_S_OK = 0 Const HR_ERROR_FILE_NOT_FOUND = &H80070002 Const HR_SL_E_GRACE_TIME_EXPIRED = &HC004F009 Const HR_SL_E_NOT_GENUINE = &HC004F200 Select Case objSLP.LicenseStatus Case "0" strSLPLicenseStatus = "Unlicensed" Case "1" strSLPLicenseStatus = "Licensed" Case "2" strSLPLicenseStatus = "Out-Of-Box Grace Period" Case "3" strSLPLicenseStatus = "Out-Of-Tolerance Grace Period" Case "4" strSLPLicenseStatus = "Non-Genuine Grace Period" Case "5" strSLPLicenseStatus = "Notification" Select Case objSLP.LicenseStatusReason Case HR_SL_E_GRACE_TIME_EXPIRED : strSLPLicenseStatus = strSLPLicenseStatus & ", grace time expired [code &HC004F009]" Case HR_SL_E_NOT_GENUINE : strSLPLicenseStatus = strSLPLicenseStatus & ", not genuine [code &HC004F200]" Case Else : strSLPLicenseStatus = strSLPLicenseStatus + " [code " & objSLP.LicenseStatusReason & "]" End Select Case "6" strSLPLicenseStatus = "Extended Grace" Case Else strSLPLicenseStatus = objSLP.LicenseStatus End Select Next End Sub Dim strSLSOA3xOriginalProductKey Sub WMI_SLS ' SoftwareLicensingService: Set colSLS = objWMIService.ExecQuery("SELECT * FROM SoftwareLicensingService",,48) For Each objSLS in colSLS ' Set variables gathered from SoftwareLicensingService: If strRegWinVersion => 6.2 Then strSLSOA3xOriginalProductKey = objSLS.OA3xOriginalProductKey Else strSLSOA3xOriginalProductKey = " {{ Not Applicable }} " End If Next End Sub Dim strCSManufacturer Sub WMI_Win32CS ' Win32_ComputerSystem: Set colCS = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem",,48) For Each objCS in colCS ' Set variables gathered from Win32_ComputerSystem class: strCSManufacturer = objCS.Manufacturer Next End Sub Private Function fnDecipherMSKey(BinaryValuePID) Const KeyOffset = 52 isWin8 = (BinaryValuePID(66) \ 6) And 1 BinaryValuePID(66) = (BinaryValuePID(66) And &HF7) Or ((isWin8 And 2) * 4) i = 24 Chars = "BCDFGHJKMPQRTVWXY2346789" Do Cur = 0 X = 14 Do Cur = Cur * 256 Cur = BinaryValuePID(X + KeyOffset) + Cur BinaryValuePID(X + KeyOffset) = (Cur \ 24) Cur = Cur Mod 24 X = X -1 Loop While X >= 0 i = i -1 KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput Last = Cur Loop While i >= 0 If (isWin8 = 1) Then keypart1 = Mid(KeyOutput, 2, Last) insert = "N" KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0) If Last = 0 Then KeyOutput = insert & KeyOutput End If arrPKey(0) = Mid(KeyOutput, 1, 5) arrPKey(1) = Mid(KeyOutput, 6, 5) arrPKey(2) = Mid(KeyOutput, 11, 5) arrPKey(3) = Mid(KeyOutput, 16, 5) arrPKey(4) = Mid(KeyOutput, 21, 5) fnDecipherMSKey = Join(arrPKey,"-") End Function
Short check in Windows 8.1 Pro VM with OA3.0 key in vBIOS. Spoiler Code: Microsoft Windows Product Key Retrieval Script (MWPKRS) -------------------------------------------------------------------------------------- Microsoft Windows Unknown Product Key -------------------------------------------------------------------------------------- Windows(R) Operating System, VOLUME_KMSCLIENT channel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Product Name: Microsoft Windows 8.1 Pro Edition ID: Professional Product ID: 00261-50000-00000-AA172 Product Key: " XXXXX-XXXXX-XXXXX-XXXXX-9D6T9 " Partial Product Key: 9D6T9 Lic Type / Channel: Unknown License Status: Notification [code -1073418225] -------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------- Additional Product Key(s): REG.HKLM.WinNT.CV.DigitalProductId: XXXXX-XXXXX-XXXXX-XXXXX-9D6T9 REG.HKLM.WinNT.CV.DigitalProductId4: XXXXX-XXXXX-XXXXX-XXXXX-PWD3K WMI.SLP.PartialProductKey: 9D6T9 WMI.SLS.OA3xOriginalProductKey: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX -------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------- WMI.CS.Manufacturer: VMware, Inc. OEM Information: Manufacturer: Model: -------------------------------------------------------------------------------------- 07.07.2015 19:19:51 MWPKRS: 21150705.7 - 16:34 Alpha It correctly detects the installed gVLK and the OA3.0 key in BIOS (i masked it apparently). Not sure about the second key, PID Checker gives: Code: Product Key : XXXXX-XXXXX-XXXXX-XXXXX-PWD3K Profile : NT 6.3 Validity : Invalid
I see, i tested older version . Code: Microsoft Windows Product Key Retrieval Script (MWPKRS) -------------------------------------------------------------------------------------- Microsoft Windows VOLUME_KMSCLIENT Product Key -------------------------------------------------------------------------------------- Windows(R), Professional edition Windows(R) Operating System, VOLUME_KMSCLIENT channel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Product Name: Microsoft Windows 8.1 Pro Edition ID: Professional Product ID: 00261-50000-00000-AA172 Product Key: XXXXX-XXXXX-XXXXX-XXXXX-9D6T9 Partial Product Key: 9D6T9 License Family: Professional Licence Channel / Type: VOLUME_KMSCLIENT | Volume KMS Client License Status: Notification [code -1073418225] -------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------- Additional Product Key(s): Registry: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion DigitalProductId: XXXXX-XXXXX-XXXXX-XXXXX-9D6T9 WMI.SLP.PartialProductKey: 9D6T9 WMI.SLS.OA3xOriginalProductKey: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX Registry: HKLM\SOFTWARE\Microsoft\Internet Explorer\Registration DigitalProductId: XXXXX-XXXXX-XXXXX-XXXXX-9D6T9 Registry: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DefaultProductKey DigitalProductId: XXXXX-XXXXX-XXXXX-XXXXX-C9WKB -------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------- WMI.CS.Manufacturer: VMware, Inc. OEM Information: Manufacturer: Model: -------------------------------------------------------------------------------------- 07.07.2015 20:02:49 MWPKRS: 21150707.2 - 18:55 Alpha OA3.0 key still detected correctly .
Saw you need some guinea pigs, so i fired up OA3.0 VM to check . Was created to check my own script. Know-how presented by MDL (especially Yen) .