Jump to content
Sign in to follow this  

Solution to "Computer Locked" Screen (CTRL + ALT + DEL scripting)

Recommended Posts

EDIT: Whoops, just realized this should have gone into the Code Example Forum. Can someone move it for me please?

Hi Everyone,

I've been using Autoit for a while, and one problem I've run into is not being able to script the dreaded "Computer Locked", aka ctrl+alt+del. I've tried all sorts of solutions, none of which have worked, until now, and I thought I would share with the community. I have not seen anyone else try this, but if you have, kudos to you :-) Essentially what I did was install a vnc server, allow local loopback connections, and a script to connect to myself (behind the scenes). Since the VNC folks already have a method to send the ctrl + alt + del, I thought that would be the most useful. Here is a basic walkthrough:

1. Download and install TightVNC, both client and server.

2. Right Click on the new VNC icon in the system tray.

3. Click Properties.

4. Set a password.

5. Click Administration.

6. Check "Allow Loopback Connections"

7. Click ok

Now use the following code to create a script, filling in the appropriate passwords where required.

#cs ----------------------------------------------------------------------------

AutoIt Version: (beta)

Author: Jason More

Script Function:

Unlock the computer using VNC

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here


;slowing down the key presses helps with the connection


;this should point to your tight vnc installation

run("C:\Program Files\TightVNC\vncviewer.exe","C:\Program Files\TightVNC")

winwait("New TightVNC Connection")

controlsend("New TightVNC Connection","","Edit1","localhost")

controlclick("New TightVNC Connection","","Button5")

winwait("Standard VNC Authentication")


controlsend("Standard VNC Authentication","","Edit3","Replace with your VNC password")

controlclick("Standard VNC Authentication","","Button1")





controlsend(stringlower(@ComputerName),"","ChildClass1","Replace with your Logon Password{Enter}")



I hope this can help someone. Any questions let me know.


Edited by frozensun

Share this post

Link to post
Share on other sites

Thanks a Lot for the solution. Its works like a charm.

However I wanted to put in a check if the system is locked or unlocked. If this script runs when the system is unlocked I see multiple windows so what do I need to check to know whether the system is locked ?

Thanks in advance.

Share this post

Link to post
Share on other sites

I got it


somewhere in the middle.

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  

  • Create New...