run command/script when lock/unlock windows station?
Yes, windows 7 task scheduler allows a dizzying array of new ways to schedule tasks:
One is on log on, and another is on event which could be a security event for locking the workstation.
Administrative Tools --> Task Scheduler - Create Task --> Triggers Tab --> New Button --> Begin Task drop down box... etc.