Chosen Solution

i have seen this with a latitude E6400 , an inspiron 1501, and now an optiplex 960 sff it boots past bios , it will insall windows on hard drives with installation disk, but when booting to windows right before it goes to the login screen the desktops and laptops restart i have bought a new motherboard for the latitude E6400 and after replacing the motherboard it was completely fine pls help

Thermal paste on CPU? It could be overheating right as it hits login. Try booting into safe mode. If it’s Windows 7, per the tag, than hold down f8 as you boot. Good luck!

it could be due to faulty hardware or software,you try this guide on How to Fix Windows 10 Keeps Restarting issue.