u can repair ur windows XP OS without loosing any setting or data, if u have any missing OS file or any errors, repairing will fix it.

Reboot the computer with first boot device as CD-Rom

Place the Win XP cd in CD-Rom

At the prompt "Press any key to boot from CD" press any key

Setup starts-Here u also see a Repair option but dont use it-Press Enter to continue setup-Press F8 to accept License Agreement

Now setup will search for previously installed Operating systems, a list will be displayed
Note: if u have windows 98 it wont be displayed in the list

Select the Operating system which ur repairing, like "C:\Microsoft Windows XP Professional"


Press 'R' to repair

Setup startup copying files and Restarts

Note: if the file copying process is not done and the system restarts u have to again follow the same as above by booting from CD-Rom, after file copying is done system restarts

Now u have to boot from HDD not from CD, At the prompt "Press any key to boot from CD" dont press any key, setup will continue

U need ur CD key

Warning: If u have downloaded Service Pack 2 and installed it then u have to again download and install it after repair

If u have ur Service Pack 2 inbuit in the XP CD then no need to worry, it will get installed along with Os