Sign in to follow this  
Followers 0
godzillarama

How to NOT Stop a Script if the Workstation is Locked with ALT-CTRL-DEL

4 posts in this topic

Greetings. My script is designed to run in the background and provide users with a variety of keyboard shortcuts for a specific application that does not have such shortcuts. I provide the users this script as an EXE.

But when a user needs to leave their desk, they lock their workstation with ALT-CTRL-DEL. This crashes my script. It's still visible in the System Tray, but it no longer works. And it isn't "paused" - it's just dead in the water. It has to be exited via the System Tray and restarted.

Using Win-L to lock the workstation causes the same problem. I'm thinking this will happen to any script - correct? Is there a way to avoid it? I'd appreciate any advice.

Share this post


Link to post
Share on other sites



What are you talking about? Nothing happens with scripts when the comp is locked. It's all in your code if something really happen. Post a small runnable (working) reproducer so we know what you're talking about.

Share this post


Link to post
Share on other sites

Thanks, I cut my script down to a bare minimum and it does not, in fact, stop when the workstation is locked. Now I need to add back in until I find the culprit.

Share this post


Link to post
Share on other sites

In a nutshell, Windows suspends all GUI/Keyboard/Mouse activity when a workstation is locked. I've had this issue with all scripts that need to manipulate any GUI. My only workaround has been to run the script in a remote session and lock the workstation. This way the remote session is still being processed while the workstation is securely locked.

If you are running a script on a user's workstation then maybe you can devise a method of checking the PC state. Then you suspend your script if the workstation locked and resume once available. I think somewhere in this forum lies a script that can check if a workstation is locked...you just need to find it.

Good luck.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0