Is there a way I can run a batch file upon locking my computer, and then run another batch file when I unlock it? (Windows 8.1)

Thank you!

  • Yes use a schedule task – Ramhound Jan 30 '14 at 0:11

I am sorry I can't give you english screenshots.
Just create a task in planned tasks.
At the "trigger" tab, you can select "At lock" and "At unlock".

|improve this answer|||||
  • Is this the view you're talking about? i.imgur.com/X6q5iNH.png Where are the triggers? – intA Jan 30 '14 at 0:38
  • If I go to 'create basic task' I eventually get to this screen i.imgur.com/gJAvO43.png and there are so many options!! I can't find lock and unlock. – intA Jan 30 '14 at 0:40
  • Not Basic Task. "Create new task". -> Sorry, I don't have an english Windows here. – davidbaumann Jan 30 '14 at 1:04

As user294496 pointed out, one of the fastest ways to do this would be to set a "Scheduled Task" up to execute your batch files at lock/unlock.

Another option would be to take a look here and see if this little GUI tool that somebody wrote for something similar might be a better option for you if you don't want to do this using scheduled tasks. If you are interested in writing some C#, I'll bet it wouldn't be too difficult to write a utility similar to this.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.