Jump to content

Detecting computer lock and cancelling


ChrisO
 Share

Recommended Posts

Hey all,

I have a script I need to detect when the user attempts to lock the computer (Win+L) and then cancel the lock if possible.

At the moment I can detect when the computer is locked but I can't find a way to stop the computer being locked.

Is that even possible to do? :)

Thanks in advance.

Link to comment
Share on other sites

The easiest solution is to remove/disable the keyboard (and potentially the mouse for OSK or Start Menu Locking) from the computer.

A working software solution is to create a device driver for the keyboard (and potentially the mouse) or replace the GINA.

With AutoIT you can detect the keystrokes in time to do something, but I do not believe there is anything that you can do to stop the lock process. In other words, you probably cannot intercept the keystrokes without a filter driver or some solution like that.

Would disabling the Windows keys be a solution for you? Of course you may still have to block command line locking to be safe.

FYI, while your intentions may be legitimate and may peak the curiosity of some of the advanced programmers (not scriptwriters) here, I fear that most will proceed cautiously (if at all) because of the potentially malicious uses for such a solution.

Edited by Varian
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...