Computer Tips From A Computer Guy

Computer Tips From A Computer Guy


Temporarily Disable Sleep Mode in Windows with Insomnia

Posted: 26 Dec 2009 03:24 AM PST

Sleep mode can be useful at times when we want to save our laptop batteries, but we do not want to wait for the entire startup routine later.  Most laptop users set their PCs to sleep after just five minutes of non-activity, while the Windows default is just 15 minutes, even when plugged into a power source.

However, there are times when sleep mode is completely inconvenient, like when giving a presentation or watching a DVD.  Microsoft's Insomnia is a free application designed to solve this issue without constantly reconfiguring your power settings.

Insomnia downloads as a zip file of just 139 KB. Once extracted, the program does not need to go through any kind of installation process to work. Simply double-click the green, pill-like icon and the program starts.

insomnia folder

Once open, the application appears as simply a pop-up window stating that the computer cannot enter sleep mode so long as the window is open.

Insomnia popup window

The temptation to then send your computer into sleep mode (just to see if it will work, of course) is overwhelming. In both Windows Vista and 7, manually sending the computer into sleep mode worked, despite Insomnia's assurance it would not.

However, neither the Vista nor 7 PC would sleep based on the automatic power settings while the window was open—meaning the program does exactly what it is designed to do.

While it serves its intended purpose, the program lacks one necessary feature: the ability to minimize the window. So, if watching a DVD outside of full screen mode, this window will appear in front of the movie. It can be moved to a remote corner of the screen, but it simply cannot disappear.

For the tech-savvy, Microsoft has included the source code for Insomnia in the zip file.

disable sleep mode

In less than 40 lines of code, the program calls upon the "SetThreadExecutionState Win32" API used by many of the most popular DVD players to keep PCs from sleeping during a movie.

Ultimately, many will be disappointed with this application. It does precisely what it says it does—it keeps the computer from falling asleep during inconvenient times without having to re-configure your computer's power options.

However, Insomnia would benefit from a couple added features, such as the ability to minimize the window.

Insomnia can be downloaded from: MSDN.com


Copyright © 2007
Online Tech Tips.
Aseem Kishore (digitalfingerprint: a59a56dce36427d83e23b501579944fcakmk1980 (74.125.158.81) )

Post from:

Temporarily Disable Sleep Mode in Windows with Insomnia