It may be a fatal error that is causing the computer to restart. You can easily stop the restart problem by changing your system
features to restrict automatic startup when your computer's having a problem. Here is how:
Use System Failure Settings to Stop Automatic Restarts.
1. Click Start and Open the Control Panel
2. Go to System and Maintenance, Click on System.
3. Select Advanced System Settings and choose Advance tab.
4. Under Startup and Recovery, click on Settings.
5. Under System failure uncheck Automatically restart.
Hope this helps!