Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to be able to use hotkeys to run scripts when the screen is locked.

I have:

^!p::Run, D:\path\to\my\script.bat

But if the computer is locked it won't run.

I'm running Win7 64.

share|improve this question

migrated from stackoverflow.com Jun 9 '13 at 12:12

This question came from our site for professional and enthusiast programmers.

2  
As far as I know, this is a protection method from Windows, nothing AutoHotKey can do about it. Otherwise, you could run a login script while Windows is locked. – Robert Ilbrink Jun 9 '13 at 9:24
    
So there's no way I can run my script when it's locked? – pocpoc47 Jun 9 '13 at 10:07
    
No, you might want to take a look at task scheduler. – user197261 Jun 9 '13 at 11:24
    
But task scheduler run it at certain times, not when I want to – pocpoc47 Jun 9 '13 at 12:44
    
Not a solution, but the best thing I could offer is to replace Windows' Ease of access functionality with cmd.exe. You can then communicate with your script via command line, e.g. with start parameters, without having to log in. – MCL Jun 12 '13 at 18:46

AutoHotKey scripts cannot take user input, or raise GUIs while the machine is locked as a security measure. As stated in the comments, you can replace the Ease of Access program with a script or batch, and, when that is run, it can take input, etc. though this opens a potential security issue depending on the functions of your script.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .