run command/script when lock/unlock windows station?
Asked Answered
D

2

28

I have Windows 7 pro at work. My problem is I keep on forgetting to clock in/clock out (using the intranet timesheet system). Is there a way to run a script or command to automatically open the timesheet page each time I lock/unlock my station?

Dasyure answered 2/12, 2009 at 4:33 Comment(4)
#271129Vigilance
that link doesn't account for new functionality in windows 7Review
probably belongs on superuser.comReview
had i known this could be done with task scheduler i woulda posted this over superuser :)Dasyure
R
36

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.
Review answered 2/12, 2009 at 4:39 Comment(3)
yay it worked! is there a way to make it so that the computer will NOT lock until i kill iexplore.exe? tyvm!Dasyure
Not that I know of... you may want to make a task that automatically writes the time to a text file when you lock the screen, and then when you unlock it then automatically bring up the timesheet AND the text file...Review
Nice. I wonder if its possible to pass as argument which trigger/event that started the task?Spoilsman
L
2

You can use the trigger event "on workstation unlock"...or "on workstation lock", in Windows 10 task scheduler.

Libbylibeccio answered 9/11, 2021 at 10:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.