Explore Product Key in Windows 10, 8, 7. If you have placed Product key of this Microsoft’s Operating System and can’t recover, then we have a remedy. You can use the VBScript to do the same very straightforwardly. We will give here the VBScript hence, the remaining job for you will be only to do a double click. Furthermore, we will also write the steps to Explore Product Key in Windows 10, 8, 7.
How to Explore Product Key in Windows 10, 8, 7
Step 1 – Open Notepad with the method you feel comfortable.
Step 2 – Copy the piece of codes from the block below and paste into Notepad.
Dim objshell,path,DigitalID, Result Set objshell = CreateObject("WScript.Shell") 'Set registry key path Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" 'Registry key value DigitalID = objshell.RegRead(Path & "DigitalProductId") Dim ProductName,ProductID,ProductKey,ProductData 'Get ProductName, ProductID, ProductKey ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName") ProductID = "Product ID: " & objshell.RegRead(Path & "ProductID") ProductKey = "Installed Key: " & ConvertToKey(DigitalID) ProductData = ProductName & vbNewLine & ProductID & vbNewLine & ProductKey 'Show messbox if save to a file If vbYes = MsgBox(ProductData & vblf & vblf & "Save to a file?", vbYesNo + vbQuestion, "BackUp Windows Key Information") then Save ProductData End If
'Convert binary to chars Function ConvertToKey(Key) Const KeyOffset = 52 Dim isWin8, Maps, i, j, Current, KeyOutput, Last, keypart1, insert 'Check if OS is Windows 8 isWin8 = (Key(66) \ 6) And 1 Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4) i = 24 Maps = "BCDFGHJKMPQRTVWXY2346789" Do Current= 0 j = 14 Do Current = Current* 256 Current = Key(j + KeyOffset) + Current Key(j + KeyOffset) = (Current \ 24) Current=Current Mod 24 j = j -1 Loop While j >= 0 i = i -1 KeyOutput = Mid(Maps,Current+ 1, 1) & KeyOutput Last = Current 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
End Function 'Save data to a file Function Save(Data) Dim fso, fName, txt,objshell,UserName Set objshell = CreateObject("wscript.shell") 'Get current user name UserName = objshell.ExpandEnvironmentStrings("%UserName%") 'Create a text file on desktop fName = "C:\Users\" & UserName & "\Desktop\WindowsKeyInfo.txt" Set fso = CreateObject("Scripting.FileSystemObject") Set txt = fso.CreateTextFile(fName) txt.Writeline Data txt.Close End Function
Step 3 – Click on File on the Notepad followed by Save.
Step 4 – When Save as Dialogue box appears, give a name it of your choice but, remember to write file extension .vbs. For example, if you will write a name product and .vbs next to it then the full name of the file will be product.vbs.
Step 5 – Finally, hit Save button visible at the bottom of the dialog box. Therefore, the .vbs file is saved in your desired location.
Step 5 – At last, make a double click on the just created file (For me it is product.vbs). Consequently, a pop up materializes on the screen revealing what the product key of your Windows 10, 8, 7 is.
Step 6 – Hit Ok button on the Pop up to get windowskeyinfo.txt showing the details of the product it in a notepad.
Simply Download and Run VBScript
If you don’t want to take tension to follow these steps then we have placed the VBScript to below. Simply click the download button to grab it on your Windows. Once the download gets over, perform a double click run it.
Hence .vbs file functions as a dream in order to Explore Product Key in Windows 10, 8, 7.