Dell Dimension 9200 keeps shutting down and won't start up

Hi. My dDell Dimension 9200 keeps shutting down and what's more weird starting up by itself. I had 1 and 2 lights on sometimes, but disconnecting external hard drive seemed to get rid of it. Now pc has shut down, and tryes to restart, but shuts off in a second or two. It feels like it doesn't have enough power. But why does it work sometimes? That has been happening for the last few weeks now. Sometimes it works for a good few hours, but then the same problem occurs. I cannon understand what it is, hardware or software problem. Tryed different settins in bios, formated hard drive, reseated as many things as i could, nothing helps. I don't know where to start with that thing. Any ideas?
PC specs
core 2 duo 6400 2.13ghz
3gb ram
375w psu

Thank You

The key issue on the uncommanded shutdown is the POWER LED. If upon shutdown, the power LED Flashes AMBER, then the power supply is suspect.

If no flashing amber indication, then the next think I check is the heatsink (Processor overheating) remove, clean and apply arctic Silver heat transfer paste, see if the issuje goes away

Last but not least if the system is failing to boot, and displays a 3 4 diag LED code, then you may have a RAM module that is bad or may just need reseating. Running diags off of the Rersoujrce CD is something to look at too

Diagnostic Lights Dell™ Dimension™ 9200 Service Manual

possible the start switch is the culprit, hanging up an keeping contacts closed causing a shut down

Note remove power cord if you attempt this repair