First you need to establish if it's the hard drive that's causing the problem, by testing it with the manufacturer's diagnostic software for DOS which loads from a bootable CD.
For WD hard drive, the link to the CD Image (ISO file) is here: http://www.smartestcomputing.us.com/topic/63494-looking-for-western-digital-data-lifeguard-iso/
For other makes of drive the links are here:
http://www.tacktech.com/display.cfm?ttid=287
Download the appropriate CD Image and create a CD from it with IMGBurn on any working computer:
http://www.filehippo.com/download_imgburn
Then boot your faulty computer from that CD and the testing software will open.