A Windows repair should only be used as a second-to-last resort, before a complete format. A Windows Repair actually overwrites all the system files, leaving you with a computer with a few less programs, and having to reinstall some programs. If you need to replace some system files, as you think that is the problem, try this:
Start>Run>type "sfc /scannow" without quotes.
You will see a dialog box pup-up, and may inform you to insert your original XP disc. This option only writes over the system files that have been changed from the original, and is much easier to most computer users that have never seen the pre-install Windows environment.
What is the exact error you are getting?
Here is a good link for sfc /scannow
Here is a good link for Windows Repair
Hope this helps...