Windows

Change the product key on Windows XP

Even in the most carefully managed shops, software tends to get installed without authorization, and so from time to time you may need to reset the Microsoft Windows XP product key. Brien Posey shows you two effective ways to change the Windows XP product key: editing the registry and using a Microsoft WMI script.

For most Microsoft Windows XP installs, you'll never need to worry about the validity of the product key assigned to your copy of the OS. However, software does tend to get installed without authorization, even in the most carefully managed shops, and so from time to time you may need to reset the Windows XP product key.

For example, perhaps a user installed a pirated copy of XP but now wants to go legal. Maybe you've been hired by an organization that installed 100 pirated copies of XP but now has a legitimate volume-licensing key (VLK). Perhaps an end user purchased an additional retail license for XP but needs to use his original CD to install the software. When situations like these arise, changing XP's product key is often the most practical-or only-solution.

Determining if you have a valid product ID

Hopefully you already know if you're dealing with a pirated copy of XP. But if you're unsure, a quick way to tell is to install Service Pack 1. Shortly after releasing Windows XP, Microsoft realized that most pirated XP installations were using two specific VLKs, the most popular of which begins with "FCKGW." These VLKs produce product IDs that match either XXXXX-640-0000356-23XXX or XXXXX-640-2001765-23XXX, where X is any number.

If you try to install SP1 and get the following error message:

The Product Key used to install Windows is invalid. Please contact your system administrator or retailer immediately to obtain a valid Product Key..."

You are dealing with a pirated copy of Windows. For more information about obtaining a valid product key, see Microsoft Knowledge Base article 326904.

You can also directly check the operating system's product ID by right-clicking on My Computer, clicking Properties, and selecting the General tab. The machine's product ID will be located under the Registered To section. If the ID matches either of the two models commonly associated with VLK fraud, you'll need to obtain a valid XP product key before proceeding. None of the procedures described below will work without a legitimate product key.

Two methods of changing Windows XP's product key

You can change a Windows XP installation's product key either by editing the registry or by using one of two Windows Management Instrumentation (WMI) scripts. The registry editing method is outlined in Knowledge Base articles 321636 and 328874 and works on Windows XP Home, Windows XP Professional, and Windows XP Corporate Edition.

The script method is outlined in article 328874 and is designed to work on Corporate Edition installations that use a VLK and do not require activation. It may work on a Home or Professional installation, but I have not tested this scenario.

The script method is the practical solution for changing the product keys on a large number of machines. Regardless of the method you choose, make sure to backup important data before changing a product ID, since an unexpected problem could render the machine unbootable and necessitate a complete reinstallation of Windows.


Warning

The following instructions involve editing your system registry. Using the Windows Registry Editor incorrectly can cause serious problems that require the reinstallation of your operating system and possible loss of data. TechRepublic does not support problems that arise from editing your registry. Use the Registry Editor and the following directions at your own risk.


Editing the registry

Begin by opening the Registry Editor and navigating to

HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsNTCurrent VersionWPAEvents

In the right pane, right-click the ODBETimer binary value and select Modify. Change at least one character of this value to either a number from 0 to 9 or to a letter from A to F, then click OK and close the Registry Editor. This renders the current product key invalid and deactivates Windows.

Now, it's time to reactivate Windows using your new product key. Click Start | Run and enter the command:

%systemroot%system32oobemsoobe /a

where %systemroot% is your Windows directory. In many cases, this command will look like:

C:windowssystem32oobemsoobe.exe /a

At this point, Windows will launch the Product Activation Wizard.

Figure A

Product Activation Wizard
Select the option to telephone a Microsoft customer service representative to activate Windows, as shown in Figure A, and click Next. Now, select the Change Product Key option and enter your new product key as shown in Figure B. Finally, click Update and close the window. If Windows returns you to the previous screen, just select the Remind Me Later option. When the wizard is finished, reboot the system.

Figure B

Enter new product key

When Windows reboots, your next step will depend on which Windows XP version you are using. If you have XP Home or Professional, you'll be prompted to reactivate your copy of Windows through the normal activation process. If you have XP Corporate, no activation is required and your machine should have a valid product ID. You can verify this by running the %systemroot%\system32\oobe\msoobe.exe /a command again. When the wizard loads this time, you should see a message indicating that your copy of Windows has already been activated.

Using a WMI script

Although the registry editing process is effective, it can be tedious and impractical if you need to change the product key on more than a few machines. So Microsoft provides two WMI scripts, one for XP machines with SP1 and one for XP machines without SP1.

  1. View the code for the WMI script, ChangeVLKey2600.vbs, designed for use on XP machines without SP1.
  2. View the code for the WMI script, ChangeVLKeySP1.vbs, for XP machines with SP1 already installed.

Copy the appropriate script's code into a text file and save it as either ChangeVLKey2600.vbs or ChangeVLKeySP1.vbs. The scripts can act in conjunction with a valid product key as part of a login script to change the product ID on multiple machines. You can also execute the script from the command line to change the key on a single computer.

For example, if you wanted to change the product key on an XP machine without SP1 and had already saved the script to root directory on the C: drive, you would click Start | Run and enter the following command:

C:changevlkey2600.vbs xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Of course, xxxxx-xxxxx-xxxxx-xxxxx-xxxxx in this scenario is a valid product key.

The script should take only a few seconds to run and won't prompt you for further action unless there's a problem, such as an invalid product key. As with the registry editing method, you can verify that Windows is now using a valid product key by running the command:

%systemroot%system32oobemsoobe.exe /a

The Product Activation Wizard will load and should tell you that your copy of Windows has already been activated.

About

Brien Posey is a seven-time Microsoft MVP. He has written thousands of articles and written or contributed to dozens of books on a variety of IT subjects.

119 comments
karlandre
karlandre

Hmm will these instructions still work the same with XP SP2 or SP3?

letter_2_roy
letter_2_roy

Dear Sir, With due respect, I am considering this topic is of paramount importance in the administration of PCs. But , on standalone PC, I must check that how else it is work. with thanks & regards, swapan singha roy Bhiva Info Solution www.bhivainfo.com

andrew.glenda
andrew.glenda

Use Jellybean keyfinder and changer it's free and saves a lot of reg editing

kirk227
kirk227

It's a great solution. I can tell you one thing to make it easier. The fastest way to get your key if you've lost it or whatever, is go to belarc.com, choose download, click download in sub-menu and it will install in about 1 minute. Run it and it will give you the license # and key to not only windows, but any other program on your system. It takes about 30 seconds (dsl) and you will have an amazing amount of info about your system. Some you probably didn't even know about. The best part is it's free.

C_Hyskell
C_Hyskell

Installed too many times...Can you avoid calling MS for a new key?

tejaskhatalik
tejaskhatalik

I have tried with this but it is not working. The %systemroot%system32oobemsoobe.exe /a is not running. I have Win XP SP2

zeus_2572
zeus_2572

Can this also work also on Windows XP Professional SP2 Installer?

hmdicowii
hmdicowii

Excellent article. To the point, easy to understand and follow. Very useful.

luvwknd
luvwknd

Deleting all the data in the binary key as suggested still didn't allow Windows to become "deactivated". This didn't work as decribed. No matter what is done to the registry key in question, Windows Product Activation reports: "Windows is already activated, Click ok to exit"

nickmckenna
nickmckenna

Hello Brian Posey: I would like you to write a similar article for Window Vista. I am running Vista on a machine whose badge is German but everything else is American It's known as a Targa. I had to phone someone to activate Windows Vista but lost my notes. After loading XP software that didn't work with Vista I needed to reload Vista again. I would breathe a sigh of relief if I knew where to read the Activation Key in case I lose the O.S. again. nickmckennaATtescoDOTnet

michael1r
michael1r

I have an oem cd code, XP Pro install on a Gateway PC with COA. Installed with bootleg code. But it will not accept the correct code using WMI. It reports that it must have been typed incorrectly. The install, with the bootleg cd would not accept the coa code while installing either. Any ideas?

crnugent
crnugent

Just an FYI. If you installed an OEM version of XP and want to change the license you can only change it to another OEM license. Volume to Volume... In other words, If you have an OEM install of Windows and want to change it to a Volume License, this will not work. You will need to reinstall the OS.

lubabum
lubabum

and XP Profesional SP2 ?

philhal
philhal

Hi guys , guess its not a well known scenario , but there is a microsoft key changer that is available from Microsoft and it changes the key quickly and effortlessly , without all the mucking around with registry and scripts . The keychanger was supplied to me by MS staff to allow for just such events and issues , especially when re-imaging a large number of machines.Suggest anyone who wants it contacts microsoft or checks to see if its available on the net . Our version is for XP

emenau
emenau

Imagine this: someone buy's a NEW PC with Vista BUT there is hardware being moved from an older PC to the new one.. surprise not vista compatible hehe... then that someone decides to buy a XP CD (OEM) and discovers that the mainboard does not allow XP to install (i still don't beleive this myself but ok...) THEN the customer buy's a new mainboard... Then customer gets the activate windows by phone screen, and guess what.. WE are sorry ... 1. that code was already used to activate on other hardware (the first mainboard) 2. and it is also a OEM XP that microsoft does not support. 3. cusomer has now 2 mainboards, Vista and XP (both legal and with the official stickers) and NOTHING to work with, but he needs XP for the software he works with. M$ sold 2 copies and then turns it's back to the customer. This is how they get their so called market share???? Not very Ubuntu right? After all i managed to get his system registered, but i'm not surprised that other people thake a deep breath and say... OK crack the damn thing and get to work. All the effort to get (and pay for it twice) a legal copy of XP just not te be treated like a criminal by Microsoft is kinda criminal. Think twice before you try to check if your system has a legal copy in the way discribed in this post. Even if it is a legal one, M$ will screw you for market share. Enjoy the M$ legal system. ;-)

j3mut
j3mut

I was wondering why no one mentioned that. The tool is the easiest and I use it all the time at work when imaging systems.

awgjr
awgjr

I have a copy of Win 2K pro which has never been installed on any computer to which I have lost the Key code for it. I have Belarc an I use it very frequently, I really like it but it will not find the code unless the program is already loaded on the computer. Is the some way to find the code?

JCitizen
JCitizen

Been using it since I can't remember - '98?

kctobyjoe
kctobyjoe

wow that IS a lot of info done!

seanferd
seanferd

If XP was retail, call MS. If XP was an OEM install, contact the vendor.

seanferd
seanferd

If it is a VLK copy, you can use the script. If not, just enter whatever valid product key you have during installation. After installation, you can always change the key in the registry.

steven_gilshenan
steven_gilshenan

First I would like to thank for your input as it is sharing information that may help those that wish to change their product key. The link downloads an executable file. I don't know what will happen if I open. I like to read up on what I am doing before I run any exe. Maybe a link to a knowledge base article would be more appropriate? I will be researching the tool.

notageek
notageek

I wanted to change the code on a new Dell laptop we received so that I could clone it for deployment. I tried everything I could think of (MS's KB instructions; KeyTech KeyChanger; Magic Jellybean) but nothing would change the code. Apparently you can't change from one type of code to another (in this case, OEM to our Volume license). I have had no other verification of this except my experience.....

emenau
emenau

Not the answer to your question but... What about using a Linux distro instead? Works just as good. (or even better)

seanferd
seanferd

the way SP1 did. I can't be entirely certain, as I only do one machine at a time, and I've always edited the registry by hand the very few times I've done this.

pepoluan
pepoluan

... of cracking the Windows XP in that case.   Heck, I *bought* it, all legally, why should I be heckled?   This explains why lots of people prefer pirated editions instead of legal ones. Microsoft is treating legal purchasers as criminal, while the pirated users can walk away unhindered.

NBI Computers Services
NBI Computers Services

if the first main board did not alow xp to install then how was it activated? so with a new (second) mother board installed it installed and got to the activation screen to find out it was already actvated. HOW! he bought it from a gray market vender that must have used the key before it was sold to your customer or the copy was counterfit. a one pac oem disk comes in a brown envlope that is sealed and the coa and key cannot be seen. if it came from a 3 or 30 pac then the 3 pac or the case of 30 must be sold complete and not opened. the only way you can sell a single unit from a 3 pac or 30 case is with a new computer preinstalled. if the disk came out of a 3 or 30 pac it will be wraped in plastic with the coa on the outsite of the plastic for all to see. he should not have purchesed it. HE GOT RIPED OFF not microsoft's fault

JCitizen
JCitizen

why do you think they no longer offer recovery CDs. "Well that was no longer needed; the user is responsible for creating those!", whould be the response I'm sure. But it just makes it more likely to pull the M$ scam on people also, in my opinion.

k5baa
k5baa

If you've never installed it and lost the key then you're pretty much out of luck. The key is NOT encoded in the CD ... contrary to popular opinion. It's an algorithm.

seanferd
seanferd

I don't even know if they will still do this for Win2k, but it is possible.

NBI Computers Services
NBI Computers Services

let mne state that as an OEM system builder i mave to agree to the system builder OEM partner lic on the oem cd . as a oem i get a large price brake on tne cost of the os. in return i agree to assume the support of the os. the lower price is because microsoft does not have to support the os I DO. they dont say i have to support it for free but i do have to support it. 2 i cann only sell the software in one of two ways a: with a computer system the os being pre installed on the new computer and the coa attached to the computer case b: i may resell the complete sealed package to another system builder. the software comes in a one pack in a sealed brown fiffy type 6 x8 envlope or a 3 pack in a cardboard box or a case of 30 in a carton. if you buy a sealed os ether 1 3 or 30 and open it and install it on your own custom or other bilt computer then YOU are acting as the systembuilder and by braking the seal on the box or envolope you are agreeing to the system builder lic. meaning you must support the os. if you install it on a computer you built or your own you are the one responcible for the support. if you bought it from me sealed and then call me for support you will be charged just as if you called microsoft. if you cant support the os your self that you should not be buing OEM software. if you bought a single copy than came from an opened box or case than you are taking the chance thet is is fake or the key has been used. again the sealed system builder cd no matter if it is a 1, 3, or 30 pack is sealed and the coa cannot be seen untill the pack is opened. real oem will not sell a clear plastic shrink wraped copy with the coa visable. a single xp is in brown package and vista is in a dvd case that is in a white sleve that prevents the coa from being seen. 3 and 30 packages are in a cardboard box that is sealed and you cant see the coa's untill it is opened and once it is opened you cannot sell the indvidual units unless it is with a new computer and preinstalled. i hope this clears this up so remember if you buy oem software ether be prepaired to support it your self or dont buy it and if you a single copy of an oem and the coa is visable the dealer should not be selling it because that is not within the lic. buy at your own risk and dont blam microsoft for no support and dont blame the reseller for no support if you buy a sealed whth a good lic oem cd because by breaking the seal you are agreeing to support the software weather you sell it or use it your self.

emenau
emenau

Yes he got ripped off 2 times in a row in one week on one PC and BY MICROSOFT the CD was bought in a regulair shop nothing gray market about it yes it is a CD in a sealed brown cardboard box M$ support puts it very simple... we do not support OEM CD's The activation issue is as follows He installed XP on the PC with the original Mainboard that messed up the XP install but he already registered and activated XP on that half working setup... All i say is, M$ is not fair in how they deal with customers who pay good money. Packard Bell is not much better. I moved to linux and hope that all the M$ customers will feel good about their donation. :-)

JCitizen
JCitizen

attempts install but keys have been used by crackers. Who's fault? The crackers of course! But this ridiculous merry go round is spinning out of control. Precisely why so many have just gave up on M$ and taken up free opensource. I think MS needs a new business model; preferrably one that is not dependent on the veracity or origin of the installation media.

CharlieSpencer
CharlieSpencer

Your friend gave you the computer, and you had a shop install XP? How much did they charge you? If you paid with a credit card, contact the card company and ask to have the payment stopped. Go back and have the shop reinstall XP, and ask them to authenticate XP before you leave with the computer. This should take less than an hour. Have you considered installing a Linux distribution?

josephdolly
josephdolly

I think the shop should be reported because it is not the real thing it keeps showing up on my screen that it is so what do i do now

seanferd
seanferd

Two things could happen: it really isn't counterfeit, and they will fix the problem for you, or it is counterfeit, and the bad shop will have been reported.

josephdolly
josephdolly

My friend gave me this computer an the windows xp is conterfit an the place that did it was Pennswood in Frostburg,MD an i cant get security or play some games an it keeps kicking me of because of this i can not afford to buy windows xp i cant get update nether an i think they should pay to fix this problem you can contact me with the phone # i gave you thats how i would like to take care of this,thank you

Will_B
Will_B

I agree, if it where Priced at even 39.99 anyone could and would buy it. Microsoft could all but squash the under market. Come on with XP Home currently selling for $140 on auction sites, and Vista for well over $200 new in stores. They are kidding right... I do not support illigal activity, i am simple agreeing that Microsoft OS, for old used computers is way overpriced. You think you getting a deal buyin a P4 for $50, then to find out you need to spend another $200 for an OS. No wonder you should just buy a new PC. This also contributes to the going Green Factor.

dcolbert
dcolbert

I'm guessing that Microsoft has done TONS of market research to find the "right" price point for their products - which is the price point that maximizes profit while still being at a place that the market will bear. And it ain't $20. :) Microsoft is NOT risk adverse in trying new directions, and they're remarkably agile in adjusting to market trends. They've been "under attack" for at least the last two decades, and they continue to meet every criticism. I remember the Mac, Amiga and ST guys complaining about how lacking Windows 3.11 was. Slowly, steadily, Microsoft met all of those complaints, and the sole survivor, Macintosh, was almost a footnote at one point during that journey. Then the *nix people started talking about Windows just being a shell over a CLI, not a true 32 bit multi-user OS. And Microsoft slowly changed that. Then the same *nix users (and now the revived Mac users) started complaining about Mac security and vunerability. And Microsoft is well on their way to addressing that. They're like a giant icebreaking ship that has the ability to turn on a dime. As for $20 copies of windows ending piracy... $.99 songs exist yet users will still risk an RIAA lawsuit to get a copy of dubious quality off of a P2P or Torrent network. Some people prefer to steal at any price. As for gray market versus retail, I think consumers know. I think that if they buy a copy at some hole-in-the-wall Mom and Pop and they get a disk in sleeve, or shrunk-wrapped with a pamphlet, in their head they go, "This doesn't seem exactly right"... As opposed to going into a big-box brick and mortar and walking out with a shiny plastic box with high gloss packaging. If a suburban housewife can walk out of the back room of a market in Chinatown with a "Coach" purse she paid $25 and she is WELL aware it is a counterfeit, I think the majority of PC users in need of a single stand alone copy of Win32 know the difference between a retail and OEM or gray market copy. But I could be wrong.

emenau
emenau

Gray or not most people... and how do customers know?? they go to the shop and ask for a XP CD. then the one with the lowest pricetag is the winner. But that's M$ it's own grave diggin. I think $20 is a fair price for XP or Vista. Low enough to be in anyones reach. And this would get rid of pirated copy's as well. (tho this could create a REAL market share) :-)

dcolbert
dcolbert

If it was in a brown box, it was a "Gray market" CD. If it is a bare OEM drive kit and not a retail box, it is probably Gray Market. I don't buy for a second that people in this industry that are building DIY PCs have any trouble differentiating between gray market and legitimate retail boxed products. And these are their rules - the hardware and software manufacturers. They get to dictate the terms of their support, warranty and post-sales efforts. When you pay $150+ for an OS, that retail price accounts for the intangibles - the advertising, the salaries, the support, running the lights and air conditioning in Redmond/Bellvue. When you buy Gray Market, you've taken that portion of their price calculations out of the calculation. You justify it by saying, "$150 is a rip off for an OS". They say, "If you want full retail support, buy and PAY for our full retail package". I agree that WGA and Microsoft's invasive software assurance and licensing policies drive users to Open Source. But I think it goes both ways. People on the fence who traditionally didn't pay full retail (or didn't pay at all), either pay full retail or go open source. The only thing it might hurt Microsoft in is that they lose having a tremendous ILLIGIMATE base out there in ADDITION to their ligitimate base of installed OSes (and there is probably a benefit in being the largest installed legitimate and illigitimate base of OSes in the world). For business, in particular, you should be licensed, genuine and paid for. In that case, once you start working in support contracts for open license platforms, the cost savings quickly erodes. Sure, you can get the product and install it for "free", but that isn't where the costs are in this model. Either way, you're not getting a free ride.

Editor's Picks