cancel
Showing results for 
Search instead for 
Did you mean: 

Windows 10 auto lock after certain duration when process running

UvarajThangavel
Level 4
Hi, We facing a situation that the system (windows 10) gets locked after certain duration. Because of which the process using accessibility element fails without finding the foreground window (I assume that screen lock is cause of this issue in this case).  Could anyone please suggest how to avoid the screen lock when the process in running in windows 10 (It is already put on Never for display off and sleep mode).  Advance thanks. Regards Uvi 
3 REPLIES 3

John__Carter
Staff
Staff
Hi Uvi - the recommendation is to get IT to disable it completely. In the short term you can create an object that attaches to explorer.exe (Windows desktop) and do things like open and close the Start menu to keep the desktop active. But that's quite a nasty fix and it's better in the long term to get the screen lock/saver disabled.

ryanamiller
Level 5
You can also catch any exceptions and check if the screen is locked using the Login Agent.  If the screen is locked you can run the Login action and continue your Process, if it is not locked, continue throwing the error.

UvarajThangavel
Level 4
@john_carter @ryanamiller: Thanks a lot for your suggestions. I will try and let you know.