Recovering a Windows XP License key - Super User most recent 30 from superuser.com 2021-10-25T01:00:17Z http://www.goboef.nl/?id=feeds/question/32367 https://creativecommons.org/licenses/by-sa/4.0/rdf http://www.goboef.nl/?id=q/32367 13 Recovering a Windows XP License key Fortyrunner http://www.goboef.nl/?id=users/7286 2009-08-30T12:37:30Z 2021-09-16T19:49:02Z <p>I threw out a Windows XP machine a while ago (the motherboard failed). I kept the hard drive and the XP installation media.</p> <p>Problem is the license key was on a sticker on the machine - doh! The original manufacturer has gone bust (Evesham) and I suspect that Microsoft will be of little help.</p> <p>Is there any easy way to get the license key off the hard disk? Can I just find the file with the registry data in it and get the key using a hex editor?</p> <p>I really need a spare XP key for use in a Windows VM.</p> http://www.goboef.nl/?id=questions/32367/-/32369#32369 2 Answer by nik for Recovering a Windows XP License key nik http://www.goboef.nl/?id=users/263 2009-08-30T12:41:00Z 2009-08-30T12:41:00Z <p>This article might be useful: <a href="http://pcsupport.about.com/od/tipstricks/ht/findxpkey.htm" rel="nofollow noreferrer">Find the Windows XP Product Key Code</a>.<br> There is also this another link on a ViewKeyXP tool: <a href="http://michaelstevenstech.com/ViewKeyXP.htm" rel="nofollow noreferrer">Retrieve your XP Product Key</a>.<br> (that second link has some other tool references too).</p> http://www.goboef.nl/?id=questions/32367/-/32377#32377 5 Answer by Kez for Recovering a Windows XP License key Kez http://www.goboef.nl/?id=users/6937 2009-08-30T13:13:06Z 2009-08-30T13:22:36Z <p>If the old machine had a sticker, it was most likely an OEM license.</p> <p>OEM licenses cannot legally be moved from one computer to another one. They die when the computer dies.</p> <p>But, in answer to your question...</p> <p><a href="http://www.rwin.ch/xp-live/regedit.htm" rel="nofollow noreferrer">Load the old registry hive</a> on your new computer and then <a href="http://teamtutorials.com/windows-tutorials/retrieving-xp-cd-key-from-the-registry" rel="nofollow noreferrer">find the XP key</a>. -- EDIT make sure that you open the SOFTWARE hive instead of SYSTEM mentioned in the first guide, then open this just-opened-offline hive in the second guide.</p> http://www.goboef.nl/?id=questions/32367/-/32379#32379 4 Answer by Molly7244 for Recovering a Windows XP License key Molly7244 http://www.goboef.nl/?id=users/0 2009-08-30T13:25:51Z 2009-08-30T21:13:31Z <p><a href="http://www.winkeyfinder.com/" rel="nofollow noreferrer"><strong>WinKeyFinder</strong></a> - · View Windows XP CD Key · Change Windows XP CD Key · View Windows Vista 32bit Edition CD Key · View MS Office 2007 CD Key · View/Change XP Key · View/Change MS office Key · View Win98 Key · view Win2000 Key · View .Net Key · View Windows2003 Key</p> <p><a href="http://www.magicaljellybean.com/keyfinder/" rel="nofollow noreferrer"><strong>Magic Jelly Bean Keyfinder</strong></a> works on Windows 95, 98, ME, 2000, XP, Vista, Server 2003, Server 2008, Office XP, Office 2003, and Office 2007 family of products.</p> <p>and while you're at it, backup your XP activation files, AFAIK the latest WinKeyFinder features this option, if not, here'a a <a href="http://www.windowsnetworking.com/kbase/WindowsTips/WindowsXP/UserTips/Miscellaneous/BackupRestoreXPActivation.html" rel="nofollow noreferrer">tutorial</a>.</p> http://www.goboef.nl/?id=questions/32367/-/32567#32567 6 Answer by hyperslug for Recovering a Windows XP License key hyperslug http://www.goboef.nl/?id=users/542 2009-08-30T21:45:34Z 2009-08-30T21:45:34Z <p>Apparently <a href="http://www.nirsoft.net/utils/product_cd_key_viewer.html" rel="noreferrer">Nirsoft's ProduKey</a> can do this:</p> <blockquote> <p><code>produkey.exe /windir [Windows Directory]</code></p> <p>Load product key information from another operating system on the same computer. The [Windows Directory] specifies the base folder of Windows installation, for example: c:\windows, c:\winnt This feature is only supported on Windows 2000/XP/2003/2008/Vista/7.</p> </blockquote> <hr /> <p>If that doesn't work, you'll have to dig it out of the registry file manually by searching <pre>C:\WINDOWS\system32\config\software</pre> for the registry key</p> <pre><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId </code></pre> <p>using a hex editor I think.</p> <p>Bytes 52-66 (0x34 - 0x42) of this key hold a 15 byte number.</p> <p>In Hex, it's a 30 digit number: A2 23 51 D0 2A 38 5D 22 C4 41 6B 87 43 C1 00</p> <p>In Binary, a 120 digit number: 10100010 00100011 ... 11000001 00000000</p> <p>Converted to base 24: 751AA001EHCCLAB3JH8KDIGAG</p> <p>Mapped to Microsoft's custom base24 alphabet "BCDFGHJKMPQRTVWXY2346789" and a hyphen every 5 chars: <pre>KHCQQ-BBCW2-TT7QR-F42M6-V3YQY</pre></p> <p>I did it this way <a href="http://forums.storagereview.net/index.php?showtopic=20842&amp;st=0&amp;p=215638&amp;#entry215638" rel="noreferrer">about 4 years ago</a>, so I'm really hoping ProduKey works.</p> http://www.goboef.nl/?id=questions/32367/-/1676607#1676607 0 Answer by palswim for Recovering a Windows XP License key palswim http://www.goboef.nl/?id=users/45163 2021-09-16T19:49:02Z 2021-09-16T19:49:02Z <p>If you are able to extract the 15 bytes from positions <code>0x34</code> and <code>0x52</code> (52-66) in the <code>DigitalProductId</code> Registry Value as a Hex string, you can use the following Python (Python 3) script to convert the bytes to a Product Key:</p> <pre><code>import sys def eprint(s, *args, **kwargs): sys.stderr.write(s.format(*args, **kwargs) + '\n') class KeyConv(object): _alphabet = 'BCDFGHJKMPQRTVWXY2346789' def __init__(self, val, verbose = False): self._val = val self._verbose = verbose @classmethod def _int_to_indices(cls, val): while (val &gt; 0): yield (val % len(cls._alphabet)) val = val // len(cls._alphabet) @property def key(self): a_idx = list(self._int_to_indices(self._val)) s_key = '' for i in range(0, (25 - len(a_idx))): s_key = s_key + self._alphabet[0] for idx in reversed(a_idx): s_key = s_key + self._alphabet[idx] if len(s_key) != 25: if self._verbose: eprint('Invalid Product Key length: {} ({}) from 0x{:X}'.format(len(s_key), s_key, self._val)) s_key = s_key[-25:] chunks_key = (s_key[(5 * pos):((5 * pos) + 5)] for pos in range(0, 5)) return '-'.join(chunks_key) @classmethod def from_hex_string(cls, shex, *args, **kwargs): return cls(int(shex, 16), *args, **kwargs) if __name__ == '__main__': import argparse parser = argparse.ArgumentParser(description=&quot;&quot;&quot;Decode a Windows Registry value to the corresponding Product Key&quot;&quot;&quot;) parser.add_argument(dest='hexstring', help=&quot;&quot;&quot;The hex string to decode (from the Registry)&quot;&quot;&quot;, metavar='STRING') parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', help=&quot;&quot;&quot;Output more information about conversion&quot;&quot;&quot;) args = parser.parse_args() k = KeyConv.from_hex_string(''.join(args.hexstring.split()).replace(',', '').replace('\\', ''), args.verbose) print(k.key) </code></pre> <p>Sample run:</p> <pre><code>&gt; python3 key-conv.py -v &quot;A2 23 51 D0 2A 38 5D 22 C4 41 6B 87 43 C1 00&quot; Invalid Product Key length: 27 (CDKHCQQBBCW2TT7QRF42M6V3YQY) from 0xA22351D02A385D22C4416B8743C100 KHCQQ-BBCW2-TT7QR-F42M6-V3YQY </code></pre> <p>You can see the details about where to find the <code>DigitalProductId</code> Value in another answer, but essentially, look in the Registry Key:</p> <pre><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion </code></pre> <p>If you cannot access an interface to the machine, but can access the filesystem, find the Registry Hive at:</p> <pre><code>%WinDir%\system32\config\software </code></pre> <p>If you are having trouble extracting the data, you can Export the <code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion</code> Key and then open the resulting <code>.reg</code> file. If I wanted to expand the script, I could add a Registry or <code>.reg</code> file extraction routine.</p>