could also be a part overheating:
open up the case of the computer and dust it off.
Also check to see if fan is running properly and also power supply might have problems.
it would not be over heating
it would run for longer than 1-2 seconds before shutting down.
but it could be a fan issue sticking which stops the pc from getting hot as a fan failure circuit should work.