Check the bios battery! A week ago I had an older tower which was totally dead. Of course I thought it's the PSU, but a couple of spares didn't do the trick. Tried without RAM sticks to hear some beeps, none. Took out the GPU for the same reason, no joy. Finally took out the bios battery, tested it: 1.5 volts instead of the 3+ it should be. Changed it and voilą!
Another reason for the computer to only stay on for a short while is the processor overheat protector. Especially the Intel type plastic prongs combined with a high (long? protruding?) cooler get very easily loose, causing a gap between the cooler and the cpu. The prongs bend very easily, installing them right and tight may take some retries.