script to show windows 10 key for clean install


SUBMITTED BY: scheissegalo

DATE: Aug. 25, 2015, 11:35 p.m.

FORMAT: Text only

SIZE: 847 Bytes

HITS: 1050

  1. # Updated to windows 10. Need your new win 10 key for clean install? Just use the following script
  2. # Copy the whole script and save it to a textfile called "GetMyWin10Key.vbs"
  3. # Run it, be happy with your key
  4. Script:
  5. Set WshShell = CreateObject("WScript.Shell")
  6. MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
  7. Function ConvertToKey(Key)
  8. Const KeyOffset = 52
  9. i = 28
  10. Chars = "BCDFGHJKMPQRTVWXY2346789"
  11. Do
  12. Cur = 0
  13. x = 14
  14. Do
  15. Cur = Cur * 256
  16. Cur = Key(x + KeyOffset) + Cur
  17. Key(x + KeyOffset) = (Cur \ 24) And 255
  18. Cur = Cur Mod 24
  19. x = x -1
  20. Loop While x >= 0
  21. i = i -1
  22. KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
  23. If (((29 - i) Mod 6) = 0) And (i <> -1) Then
  24. i = i -1
  25. KeyOutput = "-" & KeyOutput
  26. End If
  27. Loop While i >= 0
  28. ConvertToKey = KeyOutput
  29. End Function

comments powered by Disqus