Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How do I find the Windows CD Key from the CD?

Question: How do you find the CD Key of the Windows CD you have? I have a Windows XP Pro SP2 installation disk but I don’t know the CD Key. Can you locate it on the CD? I do not have this installed on any other computers so I can’t search the registry for it either.

There’s a lot of confusion about CD or, more properly, “Product Keys”, those long strings of numbers and letters you need to type in when you install Microsoft Windows.

One source of confusion is where the CD Key comes from.

One hint: it’s not on the CD.

Become a Patron of Ask Leo! and go ad-free!

The fact is that for any given version of a Windows CD, the CDs are all the same. The key to unlock the CD is not stored anywhere on the CD. If it were, each CD would have to be slightly different – it’s not quite a manufacturing nightmare, but it’s at least a bad dream.

“You may think you’re purchasing a CD, but in fact, it’s more like you’re purchasing that product key.”

The product key is typically printed on a label on the product packaging containing the CD when you purchase it. If you look closely at several copies of the same product, you’ll see that the key is different on each label.

You may think you’re purchasing a CD, but in fact, it’s more like you’re purchasing that product key. Any CD will do, but it’s your possession of a unique product key that verifies you as having purchased a legitimate copy of the product.

A CD without a product key? Without your unique product key? Not worth very much.

One of the reasons that the product keys are unique is to prevent piracy. Each person should receive a unique product key, and thus that product key should be used to install on only one machine. Microsoft is fairly vague on the details of “product activation”, but it’s likely that one of the things it checks is that the product key you entered is unique, and not already in use by someone else, or on another machine.

Now, if you have a legitimate, working installation of Microsoft Windows, you can, in fact, get the product key without the sticker. There’s a free tool: KeyFinder, that will report your product keys for Windows, and several other installed programs.

So in case you haven’t guessed, those product key stickers are valuable, and should be saved. Or at least make sure to save the product key information somewhere. If you ever need to reinstall Windows, you’ll need the product key again. I’ve actually collected all of mine and placed them in a spreadsheet for safekeeping.

And, I’m sorry to have to bother most of you with the following, but I know I’ll get the questions if I don’t:

  • I cannot retrieve your product key for you.
  • I cannot activate a product for you.
  • I cannot give you a product key or activation code for any product.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

63 comments on “How do I find the Windows CD Key from the CD?”

  1. Hello
    I visited the site mentioned above (keyrecover.com), and found out they have a copy of this article in their Resources section — except the link to the free KeyFinder is simply changed to one for their non-free KeyRecover! If that’s not a crime in America, it’s at least beyond rude.
    No comment about the implications about the trustworthiness of KeyRecover corp.

    Reply
  2. im preparing to reinstall windows xp sp2 home edition…i have a genuine installation key but i cant find my cd…would it make a difference if i used another windows xp sp2 home edition cd to install it as long as i have my original key???

    Reply
  3. I understand why the product key is not on the CD. And I understand that you are basically purchasing the product key. But.. how does the computer know you are using a unique key? I’m not connected to the internet.

    Reply
  4. —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    There are two things that validate keys:

    1) they are not just a random string. There’s an algorithm that
    determines what is and is not a valid key. So you can’t just enter a
    random string of characters and have it work. Only actual, valid keys
    will work.

    2) activation. Normally you activate over the internet, and that double
    checks whether the key has been used previously. If you’re not connected
    to the internet, I believe phone activation is required and would do the
    same thing.

    Leo
    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.6 (MingW32)

    iD8DBQFF6bZfCMEe9B/8oqERAhjCAJ9v+KENW2rt/slww/7h31ZiLgVWxgCfcjQ+
    jSNwUcu+C1VyPJYS4coticM=
    =19jV
    —–END PGP SIGNATURE—–

    Reply
  5. You can find the XP Key on the CD and it is very easy to do.Put the XP CD in your Drive and right click explore.Now click on search and type in Unattend. When search finds this file on your CD, open it with NotePad and scroll down to the bottom, and there in all it’s Glory will be your XP CD KEY.

    Reply
  6. —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    It’s *a* product key, but it’s not the product key on the outside of the box.

    My expectation is that this is a placeholder that’s meant to be replaced with
    your real product key if setting up an unattended installation. I’ll bet that
    if you use it, your Windows won’t activate.

    FWIW I found it in \i386\unattend.txt.

    Leo
    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.6 (MingW32)

    iD8DBQFGRlyTCMEe9B/8oqERAnIxAJsFatuuh9zpQxVFZS6ONqJEQ+sqkQCcDbXY
    MYzCWoBW36S7Kc8Z64vjVaE=
    =ipGj
    —–END PGP SIGNATURE—–

    Reply
  7. Yes, you can get the product key from a windows xp home cd.
    How do u think it states the correct key with cd without being online. Leo do you work for MS. Or just didnt know??

    Find Windows XP Product Key from the Windows XP CD:

    1) Insert Windows XP cd into a working computer.
    2) Exit the Autorun introduction.
    3) Open “My Computer”
    4) Right Click on the Windows XP cd-rom drive and select explore.
    5) Open the USWXP32P_ZX folder.
    6) Open the sysprep folder.
    7) Open unattend.txt

    Your CD’s product key is contained within the unattend.txt file.

    Note: On some system disks, USWXP32P_ZX is a hidden folder..

    This is MS OS 101 and perfectly legal

    Reply
  8. This does not work!!!!!
    It gives you a cd key but it will not proceed get an error.
    The Product Id you entered is not valid!

    Reply
  9. —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    You have to use the CD Key on the same product. CD Keys for
    one product or version of a product will not work with
    others.

    Leo

    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.7 (MingW32)

    iD8DBQFHgnpNCMEe9B/8oqERAtfoAJ44eijYMSg2Pccd5OULvNhV/mfVxACfcDtu
    Om1cEu8nYWnE4eiFMUZHs48=
    =HoQu
    —–END PGP SIGNATURE—–

    Reply
  10. Omg thank you sooo much i didn’t have the cd key for my windows xp media center cd, but using the “Unattend” system i got it thanks a million!

    Reply
  11. Wow, I just found your site.
    It’s amazing!
    I know this won’t help someone who’s lost their CD key.
    The first thing I do when I open a CD is use a marker to write the CD key on the printed side of the CD.
    That way I can’t lose it.

    Reply
  12. You are wrong, the CD key is stored on windows XP cd’s I’m pretty sure with vista as well. I’d have to look up the exact file location, but the CD key is in a text file named UNATTEND, It’s either the first or the last thing in the file.

    Yep, there’s a product key in \I386\unattend.txt and it’s the same on all CDs for a specific version or CD-pressing run. It is NOT the same as the key on the outside of the box, and it is not a valid key for you to use on subsequent installations. Since it’s not unique I’m guessing that if you attempt to use it activation will probably fail.

    – Leo
    09-Oct-2008
    Reply
  13. If you explore the windows cd and open up I386 it does reside in a file named UNATTEND.txt. I have successfully used this on VALID windows installations. Still working to this day, have never been blacklisted.

    Reply
  14. There are several programs out there freeware that you can run and get the xp key code. Microsoft office and internet explorer. One of them is winkeyfinder. Another is jelly bean magic. Just put them in search and follow the links for download

    Reply
  15. Ummm…….This article is wrong wrong wrong. The product key IS ON THE CD. It is in a folder name I386 and the name of the file is UNATTEND.txt.

    Reply
  16. Matt, 2/9 poster.. Thank you SO much. You saved me and your suggestion Worked!!! I am so glad that people are not afraid to share their knowledge.

    Reply
  17. The ‘key’ in the folder will only get you through the first hurdle when installing Windows. However when it comes to veryifing online, it won’t work.

    Reply
  18. I have found a genuine xp disk and tried loading it using the number found in the text file, but it did not work and said the product ID is not valid, so I think the batch, or run number seems to be correct, so the cd is of no use, but thanks for the try anyway.

    Reply
  19. Leo is completely incorrect. Not all versions of the install disks are the same. There are MANY different disks, each meant for a specific distro. For example, if you have a legit key from an XP cd you purchased direct from the store, that key will not work with an OS purchased from dell. It will also not activate a system that was installed with a store bought copy of xp that has sp2. If you buy an XP sp2 install disk, it wont work with the origionals. There are also VLK copies, which wont work with retail keys. Sorry for the blatent post, but I found this article specifically because i am coding a program now to validate the serial key to a copy of xp BEFORE installing it, as in the IT field, we run across alot of installs where the customer has the license key, but not the origional content.

    I probably should have been clearer, but I wrote “for any given version of a Windows CD, the CDs are all the same”. I did not mean to imply that all XP Home’s for example are the same, but that all the variations you list comprise different “versions”. But if you get two disks of the same OEM’s disk of a specific build of a specific variation of Windows XP, all those CDs will be the same.

    Bottom line is that I think we’re actually in violent agreement – and that I’m not actually “incorrect”, just unclear perhaps.

    – Leo
    18-Jul-2009

    Reply
  20. All XP Professional RETAIL Disks are the Same. All XP Home RETAIL Disks are the same. The OEM Disks (the ones you get when you buy a pc with Windows on in) are different for each manufacturer. The way OEM works is that the PC maker loads a special file with their OEM “Code” inside. If the “code” matches with your motherboards serial, RAM, Graphics Card, First HDD, First CD Drive, First Floppy (If Present), Memory Controller, Sound Card, Ethernet Card, then windows will install WITHOUT activation. However, if you change a single piece of your pc, windows will need to be activated as it is no longer an “original pre-built” pc.

    Retail and VLK keys are also interchangeable and usable on the same CD. You people saying that the key inside UNATEND.txt is real are WRONG. Microsoft add the key so that businesses and PC manufacturers can perform mass installs with the same product key without having to activate. HOWEVER, the key becomes invalid 30 days after the OS was installed so a legitimate key then needs to be entered. The key is never on the disk; instead there is a non-reversable algorithm which checks if the key can be used. When you activate, Windows checks that it hasn’t been used to many times.

    In the case of Windows Vista, EVERY SINGLE DISK is EXACTLY the same, except, once again, for OEM Disks. All VLK and RETAIL disks are the same and contain EVERY version of Windows Vista.

    Some people need to do more research. I know these things because I have my one Windows Keys and i also have a VLK license. I also create unattended and slipstreamed XP Disks.

    Reply
  21. Just wanted to offer a correction. The file unattend.txt is a sample configuration file for setting up an unattended installation. It contains sample data, including the product key. The XP installer would not accept this as a valid product key (Whistler version).

    Reply
  22. Leo i have to beg to differ with you about any xp cd will do it will not. i have tow legal copies of windows xp and you can’t switch the numbers it says it’s incorrect. i have a copy of xp that doesn’t require a key or activation to work. when i reformat my computer is offline and therefore has no connection to the outside world so there is no way to see if it is a good key. it all has to do with looking for you to put in the correct string of letters and numbers and compare to whats on the DISK. i have Microsoft office 2003 that like xp requires a string of letters and numbers to continue installation. guess what the product key is on the disk there for comparison.
    i have a program that compares two cd’s and and shows the difference and there you have it the product keys for both xp cd’s.

    Till next time

    Reply
  23. Ummm…….This article is wrong wrong wrong. The product key IS ON THE CD. It is in a folder name I386 and the name of the file is UNATTEND.txt.
    Posted by: Sean at April 10, 2009 3:44 PM

    Sorry SEAN,
    If you have a copy of a CD with a product key, then you already know that you are holding an ILLEGAL, PIRATED copy of Windows.

    Windows CDs are NOT individual products with their own product key, which is why the certified label is included with them.

    Reply
  24. Hi Leo,
    does this mean that i can use any windows xp install disk to install the software as long as i have a genuine product key?
    I have a laptop with the Windows XP Home Edition product key on a sticker on the underside of the computer. Will this key work to validate a windows installation, regardless of the source of the disk?
    Thank you in advance for your assistance
    Shane

    Note quite. Not all XP Install CDs are the same – they vary depending on version (Pro, Home, etc.), age (with or without SP1, SP2, etc.), language (English, others) and OEM or not (Dell, HP, or full retail). If you get the same one that your product key applies to, then it should work. No way to tell from the product key, but you should be able to tell by looking at your previously installed system.

    Leo
    27-Nov-2009

    Reply
  25. Just to bring all of you peolpe up to speed. NO you can not find the CD on any copy of Windows. It just does not excist. If you do have a file called UNATTEND.TXT, it is simply a file created to allow the cd to be installed to a batch, as in the exact same computers, for a large company that has purchased the systems and computers. It is only reg to those systems and company. It will not work on any computer. The only issue I do have is, even with unattend and putting in the CD key that does come on the computer will not work, even with the proper version of XP. The key is for pro and the key will not work with the copy I have. I end up running through the online verification every time to authorize it.

    Reply
  26. Leo,
    Thanks for clarification on some topics. I just wanted to clear up some confusion some of your readers may have about the UNATTEND.TXT file. The only purpose of UNATTEND.TXT is to allow you to do an unattended installation (i.e you don’t have to answer the prompts during installation). This streamlines and automates installation. The UNATTEND.TXT is a sample. The installer needs to modify this file and include their unique information, including the product key. It can be used to set up multiple computers, but is used with a Uniqueness Database File (UDF), which contains settings unique for each computer, such as machine name.

    Good web site. Keep up the good work.

    Thanks. Unfortunately we still see lots of people going “OMG! You can use the unattend.txt file!” when, of course, it’ll eventually fail either installation or activation when that, as you say, sample key was used.

    Leo
    22-Dec-2009

    Reply
  27. hi, yes there is a sample file for an unattended build on all the c.d’s, and if you get a few of them you will find that they are all the same product key, sometimes it will work to enable you to load the software, but to activate it, it then goes online and checks your code, to which it will fail.

    Reply
  28. It’s very easy to find the original key if you have the cd, because it is on the cd!! Just follow these simple steps.

    1.Insert the Installation CD into your CD or DVD Drive.
    2.Explore the CD and navigate to the i386 folder.
    3.Open the file UNATTEND.txt and scroll down to the last line.
    4.You will find your Windows XP Product key there.

    That is not your product key. You’ll note that it does not match the key that’s printed on your box. Likely you will NOT be able to activate your copy of Windows.

    Leo
    04-Mar-2010

    Reply
  29. hi ,i thing the product key is not like the original of my license product key..is that?because my prduct key label in hir in my lop top.but i cant see the other letters of that so i try your aplication.. but this is not match in my label..is your key is working?>

    Reply
  30. Sorry Leo, you are so, so, wrong.
    To find the installation key on the CD
    (in this case, WIN XP Home Edition)
    If it autoruns, exit.
    Then START – MY COMPUTER – Right click on the drive your install disk is in, – scroll to EXPLORE – Double click Folder I386 – scroll to WINNT.SIF (1KB)
    Open with Notepad.
    You can’t imagine the elation I felt when I first discovered this. Hope you will feel the same!!

    Ah yes, the unattended installation file. Not all people have it, and for most who do the product key therein is bogus and will likely get you the “this is not a valid Windows installation” message some time after you use it. But hey, if you believe it works have at it. I won’t.

    Leo
    05-Jun-2010

    Reply
  31. Leo, re: your comment on 5th June 2010 about finding the product key on the XP Home Edition disk.
    You are describing a totally different file on the disk! Yes, I am well aware that there is a dummy key in the I386,UNATTEND file, to which you refer.
    I maintain, for anyone reading this, that the key in I386,WINNT.SIF file, (a totally different place on the disk), is good.

    Reply
  32. PrivateWalker is absolutly correct, I checked both places. UNATTEND and the WINNT.sif file, the Product Keys are completely different.

    Reply
  33. Just referring to PrivateWalker comments, I thank you for the comment, I have been looking everywhere for this information well done

    Reply
  34. If the key is not on the CD, why the XP key printed on the label of my PC (crashed) is invalid when I try to reinstall the o.s. using a win xp installation disk?.
    Moreover, I don’t think that Microsoft can check the validity and unicity of the key during installation, since the o.s. can be installed without any internet connection active.

    Reply
  35. I have the original MS XP Service Pack 1 CD.
    I tried UNATTEND.TXT and the product key given there didn’t work.
    I couldn’t find WINNT.sif

    Which is exactly why I’ve been saying that the product key is not on the disc. You need to get it from the box it was in, or the machine it was originally installed on.

    Leo
    18-Jul-2010

    Reply
  36. the key is on the cd, i have been a computer tech for over 9 years, sometimes the key will not activate windows in that case you will need to change your windows key to the key on the coa sticker that you should have on your computer, then you can activate, if the key wasnt on the cd then you would not be able to install but like i said you might have to change it, the windows key should match the coa sticker

    Reply
  37. i actually found the product key on my windows xp cd,inside the config files,just go to another computer and open the cd and then go to a file called i368 and in there u will find a config or setup config file and this will open up an internet window which will show the product key.

    Reply
  38. I think that you should know, your article is totaly incorrect ! ALL MICROSOFT DISK HAVE THE KEY ON THEM, in fact the way that they at produced there are any were from 25 to 100 keys. some times it is as easy as looking in the config file as the other post said, but in most cases you will need a working computer and a program like”DriveSpy” to search for the key. This is a very time consuming thing to do!

    This information I know to be true! With 35+ years as an IT Pro/System Administrtor I hve worked withevery OS from Microsoft, from MSDos to OS 2 to Server 2008 Data Center.

    So please in the future if you do not know the answer for people then do not post something that is wrong!

    Needless to say it’s I who believe you are wrong. This has been hashed and rehashed in prior comments.

    Leo
    14-Jul-2011

    Reply
  39. Dear J Davis and Leo:

    I used to slap PCs together and install the software. Just for fun, of course.

    Ever since I found out about the file where the KEY is supposedly stored, and Curious as I am, I checked this unattend file on every WinXP CD that passed my hands.

    Well now! Guess what? Appears you are both correct.

    In every case this file contained a CD Key, but in using it to install WinXP, not in every case this key was valid.

    Does it make sense? Who knows, or better yet … who cares?

    But, don’t take my word for it. Find out for yourselves.

    Reply
  40. i have and old hp paillion a1243w moldel and lost the cd , with home edition on it i tryed getting one from hp no luck don’t have them any more. So made recovery disk from my buddy but can only load to were you enter keys please Help Ty Barry

    Reply
  41. I dont understand, the product key in the ‘unattend.txt’ file is the same on all the discs i’ve looked at.. but if the key is not on the cd, then when you enter the key during set up how does the system know if its correct or not !?!?

    Math. Complicated math. As an over-simplification, let’s say you have a 5 digit product key. The “math” is that all combinations that add up to 13 work. So all Windows has to know is “13”, and the “rule” that the digits add up. Like I said, the actual rules and math are complex and border onto cryptography, but hopefully you get the idea.

    Leo
    07-Jan-2012
    Reply
  42. Used “keyfinder” to find my product key code for my installed version of XP. when I try to reinstall XP it tells me that this product code is incorrect. The shop did the last reinstall – could they have used a different Genuine Advantage kit disc?

    Reply
  43. @kaptain krunchi
    It might be that the XP you had on your computer was an OEM version (factory installed and made to run only on that specific computer), and the XP version you tried to install was a retail version. In that case the retail version of Windows wouldn’t recognize the product key.

    Reply
  44. I have read complaints that the Product Key stickers post-XP (Vista, 7, etc.) tend to fade over time, especially if physically attached to the machine. So be warned, copy your activation key and save it somewhere that you can find it later if you need it!!

    Reply
  45. I haven’t installed the cd yet. So I can’t retrieve it from the windows registry. I really need to have this serial code! I only have the disc and not the case it came in that had the serial code on it.

    Reply
  46. @Yasmine
    Unless you have either the original case with the key or a working copy of Windows on your computer from which you can extract the key using Keyfinder, then it looks like there’s no way you would be able to get the key.

    Reply
  47. Are you crazy? Of course the product key is on the installation CD for Windows XP! Search for UNATTEND.txt (it’s a hidden file). Its at the bottom of the text file.

    My sanity might be questionable, but with respect to unattend.txt – most of the time the key you find there does not work. In a few cases it may. In many cases there is no unattend.txt. It all depends on how you got your copy of Windows and from whom.

    Leo
    14-Jul-2012
    Reply
  48. how to find key from the cd of windows server 2008
    plz can anybody help me

    I’d recommend re-reading the article you just commented on. It addresses your question.

    Leo
    20-Jul-2012
    Reply
  49. Whenever I get a disc with a product key, I write the product key on the disk itself with a Sharpie indelible pen. That way if I have the disk, I have the key!!

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.