I had a Windows 7 computer last week that you turned and as soon as it booted to Windows went straight to shutting down. In the end I tested with only a mouse connected and found the problem to be the keyboard. Changed the keyboard for a new one and no problem. Worth a punt just test with a mouse connected and see if the computer stays on then try with a new keyboard connected.