This post will show you how to find your Windows 11/10 Product License Key using a VB Script. But I have to add that this works on Windows 8.1, Windows 7 and earlier versions too. If for some reason you need to find out your Windows license or serial, then this post is sure to help you find your Windows 10 Product Key.
Find Windows 11/10 Product Key using VB Script
Open a Notepad and copy-paste the following:
Set WshShell = CreateObject("WScript.Shell") MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) Function ConvertToKey(Key) Const KeyOffset = 52 i = 28 Chars = "BCDFGHJKMPQRTVWXY2346789" Do Cur = 0 x = 14 Do Cur = Cur * 256 Cur = Key(x + KeyOffset) + Cur Key(x + KeyOffset) = (Cur \ 24) And 255 Cur = Cur Mod 24 x = x -1 Loop While x >= 0 i = i -1 KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput If (((29 - i) Mod 6) = 0) And (i <> -1) Then i = i -1 KeyOutput = "-" & KeyOutput End If Loop While i >= 0 ConvertToKey = KeyOutput End Function
In Save as dialog box, select All files and save this file as a .vbs file, giving it any suitable name like keyfinder.vbs.
Now run this file, and you will see your Windows product key.
You can also find Windows Product Key using Command Prompt or PowerShell.
If these methods do not work for you, you can also use some free Software Key Finders to recover and save, not just Windows, but even Office, Software, Games serials and license keys.
This post will help you if you want to uninstall the Windows Product Key should you ever feel the need to.
How do I find my Microsoft Office product key for Windows 11?
Log in to your Microsoft account and navigate to your Office subscriptions. There, you can view your product key. Alternatively, third-party tools can extract the product key directly from your system.
Does Windows 11 come with key?
Yes, Windows 11 comes with a product key pre-installed on the computer’s motherboard. This key is embedded in the BIOS, allowing for seamless installation and activation.
mil gracias!
ok this is weird, i used this and it showed a different product key to the one which is installed. also the product key that it showed, doesn’t work, this was tested with windows 10 pro
make it write a text file with the key as well (so you can copy it easily):
(at the end, insert a line before End Function with this code)
Const ForWRITING = 2
Const asASCII = 0
Dim fso, f, fName, ts
fName = “Windows Key.txt”
Set fso = CreateObject(“Scripting.FileSystemObject”)
fso.CreateTextFile fName
Set f = fso.GetFile(fName)
Set f = f.OpenAsTextStream(ForWRITING, asASCII)
f.Writeline ConvertToKey
f.Close
The script needs to be run twice on my computer for some reason to create the text file, but it works.
Just press ctrl+c in message box to copy their content and ctrl+v in notepad to paste it. Yes, it works in anothers message boxes too.
ok so i tried your script AND as a comparison, ran produkey just to see if the 2 pulled the same key… THEY DID NOT, so one or the other or both is wrong.
Tried this script and it worked only for some. I have a batch of computers that all have the stickers on them, and most of them matched up, but a couple didn’t so I can’t say I can trust this 100%.
this is not work, i use this script and get the key. then reinstalling my windows 10 and activate it but microsoft say it invalid key. now my windows 10 original key is gone. so sad …
DON’T USE THIS SCRIPT
I dont like installing anything I get off the web. Last two times I have Ive gotten viruses even after scanning the download. The VBS script is just easier and safer.
I am not sure about the above script…
I have created a keyfinder.vbs as suggested, after copy pasting above text.
when running the script it got me a key alright.
BUT… totally, totally different than the actual key, not 1 group of 5 characters is the same.
Produkey retrieved the correct key.
I know, because I have the key on the Windows retail box here.
AFAIK after upgrading from Windows 7 or 8 to Windows 10, there are 2 keys: installed key and original key. It also shows original Windows version and Prod.ID.
I tried that once in the past, the original key and original edition were correctly shown.
All these keyfinders they are blocked by A/V tools.
Wish there was a decent .vbs script doing the same as ShowKeyPlus.
=
UUkeys Product Key Finder can scan all license keys on a computer within a minute. You can give it a try if you don’t like using VB script.
avec votre code j’obtiens une clef ! OK
Avec ce code-ci :
Set WshShell = CreateObject(“WScript.Shell”)
MsgBox (WshShell.RegRead(“HKLMSOFTWAREMicrosoftWindows NTCurrentVersionSoftwareProtectionPlatformBackupProductKeyDefault”))
j’obtiens une clef différente !!!!!!
WHY ???
Can’t you just open System in the Control Panel and it shows you your Product ID under the Windows Activation heading?
i beleive that is the type of windows you are running and not the actual product key, ie i am a human and my SS number is different than human??
-william
Doesn’t work.
Better script:
https://gist.github.com/craigtp/dda7d0fce891a087a962d29be960f1da
VB script worked like a charm