dj

How To Find Windows 10 Product Key Using CMD, PowerShell, And Windows Registry?

dj
Aug 6th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. 1) To go ahead with this method, you need to boot into your Windows computer. Now, using a simple VBScript–some of you might have seen it on Microsoft forums–you can read all the binary gibberish written in Windows Registry. This script translates the Registry values into a readable format.
  2.  
  3. 2) So, just copy and paste the following script in a Notepad window and save its as productkey.vbs by choosing the “All Files” option in “Save as type.”
  4.  
  5. Set WshShell = CreateObject("WScript.Shell")
  6. MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
  7.  
  8. Function ConvertToKey(Key)
  9. Const KeyOffset = 52
  10. i = 28
  11. Chars = "BCDFGHJKMPQRTVWXY2346789"
  12. Do
  13. Cur = 0
  14. x = 14
  15. Do
  16. Cur = Cur * 256
  17. Cur = Key(x + KeyOffset) + Cur
  18. Key(x + KeyOffset) = (Cur \ 24) And 255
  19. Cur = Cur Mod 24
  20. x = x -1
  21. Loop While x >= 0
  22. i = i -1
  23. KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
  24. If (((29 - i) Mod 6) = 0) And (i <> -1) Then
  25. i = i -1
  26. KeyOutput = "-" & KeyOutput
  27. End If
  28. Loop While i >= 0
  29. ConvertToKey = KeyOutput
  30. End Function
  31.  
  32.  
  33. 3) After saving this file, just click on it and a new popup window will show your Windows product key in the registry. You can copy or note this down somewhere to use it later.
Advertisement
Add Comment
Please, Sign In to add comment