An installation of Windows XP will need to be repaired or recovered when it is malfunctioning beyond repair, or when spyware or a virus has infected it to the point that cleaning the system is no longer a practical option.
The Windows XP boot CD that came with your computer can be used to reinstall XP as many times as needed. This is a relatively simple task that just about anyone can do. The entire process may take up to several hours to complete, but much of it will be done automatically, requiring no human supervision.
When the recovery process is complete, all of your documents and files will remain on the computer, though some of your system settings may be lost.
Insert the boot CD into the disk drive and restart the computer. The screen will prompt you to "Press any key to begin setup." Hit any key on the keyboard; the recovery CD will begin loading the system setup. Be patient while the installer finishes loading, as this may take several minutes to complete. If the screen seems to hang at any point, give it at least 5 minutes before attempting to restart the computer.
2
Watch for a welcome screen once the installer has finished loading. Press "Enter" once to continue. Using your up and down arrow keys, highlight your existing Windows installation. Now press "R" to repair it. This will perform a recovery install without formatting the drive or erasing any existing data.
3
Before recovery begins, accept the Terms of Use (if required) and enter your CD key, depending on what installation disk you are using. Your CD key will be a combination of random letters and numbers printed on a sticker that has been adhered to the side or back of your computer case. Enter that key and press "Enter" to continue.
4
Wait for the recovery process to restore the system files; it may take up to several hours. Once it has finished, Windows will restart. If you previously applied any security patches or fixes from Windows Update, you will want to reinstall them now, since they will have been erased during the recovery process.
Tips & Warnings
If the installer mentions anything about formatting the drive, hit "Escape" to go back. Formatting will erase all data on the drive.
Even when you are doing a repair installation, there is a slight chance your files could be erased, so always create a backup.