No solution – but explanation:
The windows product key is stored in the registry:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId The registry key "DigitalProductId" begins with the Product-
ID in plain text. At position 52 starts the windows product
key in encrypted form. You can decrypt the product key with the following file: Save this text to a text file and rename the suffix from txt to vbs; e.g. "what-ever.vbs" (all other key finder does it the same way):
Code:
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
This is a big problem when an administrator sets up many PCs with a volume license key. Because everyone can extract the VLC key and use it for additional installations. Because this reason the VLC key is automatically deleted from the registry after activation. And after this all key finder show only "not available" or BBBBB-BBBBB-BBBBB-BBBBB-BBBBB.
With command line:
slmgr –dli you can get a "Partial product key" – the last 5 characters of the product key. This "Partial product key" is saved in encrypted form in the certificate file "
tokens.dat" (C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat).
Everyone who fears that his key can be stolen can also delete
manually the product key from registry with this command line:
slmgr –cpky (cpky =
clear
product
ke
y = remove product key from the registry)
This can be tested by anyone:
- Export the registry key "DigitalProductId" to a REG-file (to backup)
- Delete the encrypted product key from registry key "DigitalProductId" with command line slmgr –cpky
- Check that "DigitalProductId" from position 52 is now empty
- Check with key finder (e.g. the above VBS script) that product key is "not available" or BBBBB-BBBBB-BBBBB-BBBBB-BBBBB
- Import the previous saved registry key "DigitalProductId" (REG-file)
- Check that "DigitalProductId" from position 52 is not empty
- Check with key finder (e.g. the above VBS script) that product key is available
Conclusion: I think it's no possible to restore the product key. Perhaps it is possible to send Microsoft the file "tokens.dat" because this file includes the "Partial product key" and a flag that verifies that the installation is activated.