|"I tried to repair the installation but it didn't work."|
Did you run the Repair installation of Windows procedure, or did you try other things ?
If you haven't tried the Repair installation of Windows procedure, try it.
You will need a Windows CD of the same version as the one of your Windows installation, and the Product Key, preferably the one that was used to install it, but it can be one for the same version as the one of your Windows installation.
In most cases you get the Product Key from the official Microsoft sticker on your computer case, or from the official Microsoft sticker that came with your Windows CD if it has not been stuck to the case, or if you can't find that or don't have that, you can use a program to find the Product Key your Windows installation is presently using, BEFORE you run the Repair Setup (Repair install) - e.g. search for: keyfinder, by Jelly Bean whatever.
NOTE that if you don't know the Product Key that was used for the non working Windows installation, search for keyfinder, by Jelly Bean whatever - They have Faqs there - you CAN get it to find the Product Key on the non working Windows installation.
How to do an XP Repair installation step by step:
First - run diagnostics on the hard drive.
Check your hard drive with the manufacturer's diagnostics.
See the latter part of response 1 in this:
If you don't have a floppy drive, you can get a CD image diagnostic utility from most hard drive manufacturer's web sites, but obviously you would need to make a burned CD, preferably a CD-R for best compatibility, on another computer if you need to.
Seagate's Seatools will test any brand of hard drive.
Do the long test.
The bootable Dos versions of SeaTools can be used even if Windows is not working properly.
If the hard drive itself tests okay, any data problems found can be fixed, one way or another.