Search code examples
windowsauthenticationautoit

Log-in to Windows


I have a script using WinActivate(). I want to make sure the "Windows locked" scenario is taken care of.

I learned log-in/locked screen is just a dialog. Will it work if I send CTRL - ALT - DEL or does anyone have a working snippet for this scenario?


Solution

  • The login screen runs on a completely separate desktop - no program from your normal user session can interact with the secure login desktop in any way. It is not "just a dialog" - it is a completely separated secure desktop.

    What the AutoIT FAQ is saying is that you can use different commands that will still work when a window doesn't have focus. If you require the window to have focus for the script to work, you will have to wait until the computer is unlocked. You can set up a scheduled event to run when the workstation is logged on or unlocked, and could configure it to only run if the script isn't already running. You could also rewrite your script using the commands referenced in the linked FAQ, so that the script runs even if it's not on the actively visible desktop.