I found this solution on the internet after many searches so I am posting it here:
First you need another computer with windows xp.
Copy the contents of the folder c:\windows\inf\ to the faulty computer. This folder is hidden so you need to change the folder options to allow the system to show hidden files.
To copy the inf directory you can create a cd or dvd with the content of this folder.
Start the faulty computer in safe mode. Remember that to do this you need to press F8 as you are booting the computer and select the option to start in safe mode.
Copy folder inf from the CD or from the good xp machine over the network to the faulty one.
Restart the computer.
This worked like a charm for me.