Prevent Windows from Sleeping

By  on  

I have a few processes on my Windows gaming PC that are critical but sometimes get impacted over night as Windows tells my beloved machine to tone it down. My machine has the necessary cooling so I'm happy to let the processes do their work.

There is a setting in the UI which allows you to prevent Windows from sleeping but disabling that didn't seem to work. Want to truly prevent sleep and hibernation? Open the Command Prompt app with "Run as Administrator" and use the following two commands:

C:\Windows\system32> powercfg.exe /h off

I've noticed better performance of those processes when I'm not using the PC so I think all is well! Keep those Windows processes rolling at max power!

Recent Features

Incredible Demos

  • By
    Creating the Treehouse Frog Animation

    Before we start, I want to say thank you to David for giving me this awesome opportunity to share this experience with you guys and say that I'm really flattered. I think that CSS animations are really great. When I first learned how CSS...

  • By
    Animated AJAX Record Deletion Using MooTools

    I'm a huge fan of WordPress' method of individual article deletion. You click the delete link, the menu item animates red, and the item disappears. Here's how to achieve that functionality with MooTools JavaScript. The PHP - Content & Header The following snippet goes at the...

Discussion

  1. Eugene

    Thanks, a useful thing! The description looks a bit confusing though. You mention two commands, but there is only one command mentioned later.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!