Review your "power management" setting and verify they are OK. You can ply with it, but I suggest "turn-OFF" any hiberate or slep modes for all devices and see if that helps. Also, under the bios area, check the system setting for "over-temp" control. Verify what it is and what action it takes, it may reach a certain temp and shutdown as it safety measure. Also, run an AV and malware scans fro any possible infection/attack. It maybe possible your HP model could be problematic so check the HP support website for any FAQ or known problems plus thier forum and query there. Check the p/s wiring at the mtrbd. for any loose or apparanet weak connection.
The computer is a Hp 503w. It has a celeron 1.7 processor, 128mb of ram, and is running xp home. It stays on for random amounts of time and then shuts down with no warnings or errors. It can be in an application or doing nithing at all. When this happens everything is off, but the power supply fan is still running. You have to hold down the power button for a few seconds to get it to go off before you can boot back up. When it boots back up it gives no error messages. Antivirus is up to date and has found no viruses. The system temp runs between 35 and 38 degrees celsius. I have replaced the power supply and ran a system recovery on the hard drive. It still has the same problem. Any suggestions out there?