In order to check if this is the problem, click on 'Start' and 'Control Panel', then, select 'Performance and Maintenance'. Click on 'System', then the 'Advanced' option, and select 'Settings' from the 'Startup and Recovery' section. You will find an 'Automatically restart' option, which you need to be unchecked for preventing the system from rebooting.