Sign in to follow this  
Followers 0
nlgma

I need to hook "Lock Computer"

1 post in this topic

I've made an hell of a script that locks windows and uses biometrics to unlock. The problem that I'm having is hooking "Lock Computer" aka Window key & L or "%windir%\System32\rundll32.exe user32.dll,LockWorkStation". Using PS tools by sysinterals from a remote machine to query running process. No instance of Rundll32.exe existed. So does anyone know of a way to check a machine localy or remotly to see if it's locked ? " Reg. maybe ? "

$Exit_Loop = 0
Do
      Sleep(250)
      If ProcessExist ("LockWorkStation") then; WTF
             Msgbox(0,"TEST","The Damn machine is locked")
             $Exit_Loop = 1
      EndIf
Until $Exit_Loop > 0

Or

$Exit_Loop = 0
Do
      Sleep(250)
      If WindowExist ("Computer Locked") then; WTF
             Msgbox(0,"TEST","The Damn machine is locked")
             $Exit_Loop = 1
      EndIf
Until $Exit_Loop > 0

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