Overview
You leave your laptop or PC on and step away for a moment, and it drops into sleep mode, the screen goes dark, the lock screen appears... and you have to type your password all over again.
SleepBlocker solves this.
Run it once and it completely blocks your computer from entering sleep mode or turning off the screen. Steadily improved over 7 years since its first release in 2018, it has now reached v3.7.
44KB. This one tiny file is all there is. No installation, no separate runtime. Download, double-click. Done.
Key Features
Fully blocks sleep mode
- Prevents the system from entering sleep (standby) mode
- Prevents the monitor from turning off
- Prevents the screen from locking
Timer
- Choose 30 min / 1 hour / 2 hours / 4 hours / unlimited
- Advance alerts 10 minutes and 1 minute before it ends
- Auto-releases when the set time elapses (safe even if you leave for the day and forget)
Lives in the system tray
- A coffee-cup icon in the taskbar tray
- Toggle on/off with a single left-click
- Full menu on right-click
- Hover to see the current status and remaining time
Dark / Light mode support
- Auto-detects the Windows system theme
- Switch manually between dark and light mode
- Theme applies to the right-click menu and the info window alike
Real-time status display
- Active: steam rising from the coffee cup animation
- Inactive: a gray empty cup
- See at a glance whether it's running
Launch on Windows startup
- Register or remove with a single click from the menu
- Sleep prevention starts automatically when your PC boots
Recommended for
- Anyone who can't afford the screen going dark mid-presentation
- Anyone in the middle of a large file download or upload
- Anyone who needs to keep a remote desktop session alive
- Anyone encoding, rendering, or converting video
- Anyone who has to keep a server or device always on
- Anyone tired of changing Windows power settings every time
- Anyone who hates re-typing their password after a screen lock
How to Use
- Save
SleepBlocker.exewherever you like - Double-click to run
- Check for the coffee-cup icon in the tray (steam means it's active)
- Sleep prevention activates automatically the moment it runs
Quit: right-click the tray icon → Exit
Toggle: left-click the tray icon
No installation required. Put it on a USB stick and use it anywhere.
To remove it, just delete the exe file. (No registry leftovers.)
If you registered auto-start, please disable it from the menu before deleting.
Why SleepBlocker?
44KB. That really is everything.
Compare for yourself:
- Similar program A: 5MB + requires the .NET runtime
- Similar program B: 12MB + requires installation + ads
- SleepBlocker: 44KB. No install. No ads. No runtime.
This is possible because it's built purely with C++ and the Windows API. It doesn't depend on external libraries and needs no runtime like .NET, Java, or Python.
- Memory usage: about 2–3MB
- CPU usage: 0% (event-driven, no resource use when idle)
- Network: none (fully offline)
Technical Specifications
| Language | C++ 17 |
| UI Framework | Win32 API (native) |
| Graphics | GDI (DC_BRUSH/DC_PEN optimized) |
| Build tools | MSVC (Visual Studio Build Tools) |
| Architecture | x64 |
| Core API | SetThreadExecutionState |
| Menu rendering | Owner-Draw custom menu |
| Icon | Generated at runtime via GDI programming |
| Theme detection | Reads the registry AppsUseLightTheme value |
| Auto-start | HKCU\...\Run registry entry |
How It Works
It uses the Windows API function SetThreadExecutionState, which continuously tells the operating system that "the system is currently in use."
ES_SYSTEM_REQUIRED: prevents system sleepES_DISPLAY_REQUIRED: prevents the screen from turning offES_CONTINUOUS: stays in effect after a single call
Because it doesn't change your power settings themselves, quitting the program restores your original power settings exactly. It leaves no side effects on your system.
