Microsoft: Change your XP key
Microsoft has put an article online on how to change your Windows XP registration key, for example when you have an illegal key or something like that when you want to install SP1:
This article describes how to change the Windows XP product key in a Volume Licensing installation. Because of changes in Windows XP Service Pack 1 (SP1), Windows XP-based computers that use a leaked product key that is known to be available to the general public may not be able to install SP1 or automatically obtain updates from the Windows Update Web site. For example, you may experience the symptoms that are described in the following Microsoft Knowledge Base article when you install SP1.
Click read more for more info...
There are two methods that you can use to change the product key with volume licensing media after installation. You can use either the Windows Activation Wizard graphical user interface (GUI) or a Windows Management Instrumentation (WMI) script.
The easier method to use is the Use the Activation Wizard method. Use this method when you only have a few computers on which to change the product key. The Use a Script method is best when you have a number of computers on which you have to change the product key.
If you have only a few volume licensing product keys to change, you can use the Activation Wizard.
NOTE: Microsoft recommends that you run System Restore to create a new restore point before you complete the following steps. For information about how to create a restore point by using System Restore, see the "To Create a Restore Point" help topic in Help and Support.
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
Click Start, and then click Run.
In the Open box, type regedit, and then click OK.
In the left pane, locate and then click the following registry key: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsNTCurrent VersionWPAEvents
In the right pane, right-click OOBETimer, and then click Modify.
Change at least one digit of this value to deactivate Windows.
Click Start, and then click Run.
In the Open box, type the following command, and then click OK. %systemroot%system32oobemsoobe.exe /a
Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.
Click Change Product key.
Type the new product key in the New key boxes, and then click Update.
If you are returned to the previous window, click Remind me later, and then restart the computer.
Repeat steps 6 and 7 to verify that Windows is activated. You receive the following message:
Windows is already activated. Click OK to exit.
Click OK.
Install SP1 for Windows XP.
If you cannot restart Windows after you install SP1, press F8 when you restart the computer, select Last Known Good Configuration, and then repeat this procedure.
You can create a WMI script that changes the volume licensing product key, and then deploy this script in a startup script. The sample ChangeVLKey2600.vbs script and the sample ChangeVLKeySP1 script that are described in this section use the new volume licensing key that you want to enter, in its five-part alphanumeric form, as a single argument. Microsoft recommends that you use the ChangeVLKey2600.vbs script on Windows XP-based computers that are not running SP1 and that you use the ChangeVLKeySP1.vbs script on Windows XP-based computers that are running SP1. These scripts perform the following functions:
They remove the hyphen characters (-) from the five-part alphanumeric product key.
They create an instance of the win32_WindowsProductActivation class. They call the SetProductKey method with the new volume licensing product key.
You can create a batch file or a cmd file that uses either of the following sample scripts, together with the new product key as an argument, and either deploy it as part of a startup script or run it from the command line to change the product key on a single computer.
You may check this and the rest from Microsoft site over here.