
It works flawlessly in all mentioned operating systems. I tested this trick on Windows 7, Windows 8 and Windows 10. Voila, you product key is displayed on the screen!Ĭlick here to download the BackupWindowsKey.vbs file.Now open your BackupWindowsKey.vbs file.Save the text above to a file with the ".vbs" extension on the Desktop.īonus tip: To make sure that you saving the file correctly with the ".vbs" extension, you can type its name enclosed in double quotes, for example, "BackupWindowsKey.vbs".Set fso = CreateObject("Scripting.FileSystemObject") UserName = objshell.ExpandEnvironmentStrings("%UserName%")įName = "C:\Users\" & UserName & "\Desktop\WindowsKeyInfo.txt" Set objshell = CreateObject("wscript.shell") If Last = 0 Then KeyOutput = insert & KeyOutputĬonvertToKey = Mid(KeyOutput, 1, 5) & "-" & Mid(KeyOutput, 6, 5) & "-" & Mid(KeyOutput, 11, 5) & "-" & Mid(KeyOutput, 16, 5) & "-" & Mid(KeyOutput, 21, 5) KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0)

KeyOutput = Mid(Maps,Current+ 1, 1) & KeyOutput If vbYes = MsgBox(ProductData & vblf & vblf & "Save to a file?", vbYesNo + vbQuestion, "BackUp Windows Key Information") thenĭim isWin8, Maps, i, j, Current, KeyOutput, Last, keypart1, insert ProductData = ProductName & vbNewLine & ProductID & vbNewLine & ProductKey ProductKey = "Installed Key: " & ConvertToKey(DigitalID) ProductID = "Product ID: " & objshell.RegRead(Path & "ProductID") ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName") Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"ĭigitalID = objshell.RegRead(Path & "DigitalProductId")ĭim ProductName,ProductID,ProductKey,ProductData Set objshell = CreateObject("WScript.Shell") Copy and paste the following text into the Notepad window Option Explicit.

All you need to do is to just click the file. PowerShell might require additional user skills and extra tweaks to run unsigned cmdlets.Ĭompared to PowerShell, this VBScript solution is almost perfect.

but many users complained that it fails for them. Actually, earlier I posted a similar solution which used PowerShell.
