Well to narrow it down i would suggest disconnecting everything, harddrive, dvd, cdrom, remove soundcard, and Graphics card, so all you have left is the motherboard, ram, cpu and heatsink and fan. I would then boot the computer to see if it stayed on. If it does stay on then i would shut down and add one thing at a time, like dvd ect. If however, it shuts down with only these few thing connected then it is one of these things causing the problem.