Your computer's power management settings control many features to protect your computer. If your computer is logging off after a period of inactivity, you must adjust your computer's power management settings. These settings control the amount of time of inactivity that must pass before putting the computer into Sleep, or hibernation, mode. When your computer goes into Sleep mode, it automatically saves all open documents, logs off Windows and stops all processes. Prevent your computer from logging off by turning off the Sleep setting in the power management section.
Click the "Start" button and click "Control Panel."
Click "System and Security" and click "Power Options."
Click "Change advanced power settings" and click the "Advanced Settings" tab.
Double-click "Sleep" and double-click "Sleep after."
Click "Settings" and then select "Never" from the drop-down menu if you are using a desktop computer.
Click "Plugged in" and select "Never" from the drop-down menu if you are using a laptop computer. Click "On battery" and select "Never" from the drop-down menu.
Click "OK" and click "Save changes." Your computer will never go into Sleep mode.