Jump to content

Saving Windows Key from Formatting

Go to solution Solved by AndreiArgeanu,

2

Hi people of the Internet,
I recently bought a new prebuild Desktop that should arrive for the end of February, I whish to format my old Desktop to resell it but I don't want to lose the Windows Key, so that I can sell it with the Key, is it possible to activate Windows with the same key after his formattation in any way (whitout logging it in my Microsoft Account)
If it's impossible can I at least recover the Key to use it in my laptop (synce my Desktop has a Windows Pro Key and my laptop a Windows Home Key)
Thanks for your time,
Gerry

Link to comment
https://linustechtips.com/topic/1283874-saving-windows-key-from-formatting/
Share on other sites

Link to post
Share on other sites

38 minutes ago, AndreiArgeanu said:

You can either run CMD as administrator and run the command below to get the license



wmic path softwarelicensingservice get OA3xOriginalProductKey

 

Or you can create a text file, copy the text below, paste it in and save it as .vbs file if the first method doesn't work. (the first one didn't work for me, but it could have been because I activated W10 using a w7 key)



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

If you use the script you should get a windows popping up showing something like this.

image.png.5ebf06c70b4b405fd3e9d458d1cc46c0.png

 

Also I cannot guarantee that you will be able to reuse your key, perhaps try it with your laptop first before doing anything. Also if the license is tied to your microsoft account, there's a chance you may not be able to reuse the license.

Thank you, the second method worked (my Desktop to came from Windows 7)
EDIT:
Now I also tried the first method on my laptop (that always had Windows 10) and it works too

Edited by Gerry96
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×