From time to time it appears that I need to keep my PC running and prevent it from going to sleep. There are a couple of places where screen timeouts can be configured: Engery options, screen saver, system idle timeout, just to name the most common ones. To get rid of it I need to figure out, which of those values are responsible for my screen timeout. It becomes even more difficult, if those options are set by Group Policy.
Therefore I coded a little utility that sits in the notification area and takes care about my system not falling asleep and not turning off my screen. It is pretty simple and does require nearly no system resources. It’s just an idle application that flags its executing thread with “SYSTEM_REQUIRED and DISPLAY_REQUIRED”. That means, as long as it is running, the system is not allowed to go to sleep or turn off the display. It is just a single EXE file based on .NET 4.0 and there are no admin privileges required for execution.
Simply download the utility from the link below and put it in a directory of your choice (a subfolder within %localappdata% would be a good choice). Here come the command line options:
- /tray: Starts StayAwake minimized in the notification area
- /autostart: Creates a shortcut in the user’s Startup folder
For your convenience: If you run StayAwake on your client for the first time, make sure you start it from a command line window (CMD) using the arguments /tray /autostart.