When activating the WinXP the following file is created:
You can backup this file so you don't have to contact Microsoft to activate. After a reinstall or repair boot into safe mode and restore the wpa.dbl. Restart into normal mode and it will ask you to activate, press Ok and it will say it is already activated.
Note that you have to use the same product key, as you used when installing the first time, as the activation is a combination of your product key and your hardware id.
Note that you can't use this file to Activate other computers, unless they are almost identical to the computer which was Activated.
Note it is possible to do quick reinstall on top of the existing installation, without loosing any setting (Even the activation). This is done by running this command from the WinXP CD (X:)
Note if using System Restore to go back to a Restore Point, which was before Windows was activated, then the Activation is lost, though one can try to Restore the backup created by System Restore.
Related Performing an inplace upgrade of WinXP.
Related Change WinXP CD Key using WPA.
More Info MS KB302878
More Info MS KB312295
More Info MS Technet: Preserving OEM Pre-Activation when Re-installing Windows XP
More Info MS Technet: Deploying Windows XP Using Windows Product Activation