1) Hover your mouse over the bottom right of the screen, or swipe from the right side if it is a touch screen machine, to produce the charm menu. Then, click "Search."
2) Type "Power Options" without the quotes, and then click the "Settings" tab on the right to bring up the below options. Then, select "Power Options" from the list to open the power settings.
3) In this window, click the "Change when the computer sleeps" option on the bottom left to bring up a new window.
4) Then, set the On battery and Plugged in sleep options to "Never."