Run commands when locking Windows 10 screen

1142425 pts.
Tags:
Windows 10
Hi experts, Whenever I lock my Windows 10 screen, I would like a list of commands to be executed. How can I set that up? Perhaps a command line operation? Or setup through Task Scheduler?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    Are you locking you screen manually or letting it time out? There may not be a way to determine it. So it would launch commands if it timed out as well. If you are locking it manually, I would just create a desktop shortcut to run a script with you commands then lock the computer.
    132,590 pointsBadges:
    report
  • Subhendu Sen

    If you did mean to lock the screen while executing applications/commands, you can write a script/batch file and first mention the applications and then for lock the screen type the command as,

    rundll32.exe user32.dll,LockWorkStation

    in the file and save it as its proper format and run the same. Be careful of the commands, of anyone delete/erase file/folder, take a backup first then execute the batch/ script file.

    138,800 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: