Windows – Run a script after I unlock the Windows session

accountsscriptingsessionwindows

How do I run a script each time I unlock my Windows 7 session?

So, if I lock my session and then log in again, I want the script to run.

Do login scripts configured in the Group Policy do this or will they only work the first time?

Best Answer

Scheduled Tasks is what you need. You can set a trigger for both workstation lock and workstation unlock. If you need to deploy it out to more machines, use SCHTASKS.EXE (provided with windows).

Hope that helps