WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: panky on May 02, 2014, 04:27:09 AM

Title: Identify system is idle and Do not allow system to get idle
Post by: panky on May 02, 2014, 04:27:09 AM
Hi,

I have seen few post of identifying whether a system is idle and for that matter for much of time. I would like to know is it possible to not a system get idle, I mean do some keystroke, mouse movements or whatever means to avoid that.

Few months back I have got some solution from forum in fact from *Deane* precisely for below script but this fails if the system gets idle (log in window/screen saver). Do I need to do some login again to avoid such cases?

http://forum.winbatch.com/index.php?topic=317.msg1321#msg1321

I am absolutely no frequent user of winbatch but just trying my hands to get some solutions for some of my other development areas.

Any directions will be much appreciated.

Best,
--PC







Title: Re: Identify system is idle and Do not allow system to get idle
Post by: Deana on May 02, 2014, 10:03:18 AM
What version of Windows are your working with?
What is your reason for wanting the system not to appear idle?

Have you considered manually disabling the lock? If dealing with Windows 7 see: http://www.sevenforums.com/tutorials/15322-screen-saver-password-protection-enable-disable.html

If you must deal with it from a script then maybe check out this DllCall to SetThreadExecutionState to keep the system from going into standby: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/DllCall~Information+Keep~XP~from~Going~Into~Standby.txt I believe this code should still work on newer Windows platforms.