I've been using this for years.  works great!  I'm sure I got it from this site, but I can't remember who posted it. $aRet = DllCall('kernel32.dll', 'long', 'SetThreadExecutionState', 'long', 0x80000003)    ;Disable windows sleep mode by making it think it's playing a movie in full screen $aRet=DllCall('kernel32.dll','long','SetThreadExecutionState','long',0x80000000)         ;Remove the always on so it will go to sleep