锁定/解锁 Windows 站时运行命令/脚本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1830666/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 06:57:36  来源:igfitidea点击:

run command/script when lock/unlock windows station?

windowsscriptingcommandlockingunlock

提问by Tam N.

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?

我有 Windows 7 专业版在工作。我的问题是我一直忘记打卡/打卡(使用内联网时间表系统)。每次我锁定/解锁我的电台时,有没有办法运行脚本或命令来自动打开时间表页面?

回答by John Weldon

Yes, windows 7 task scheduler allows a dizzying array of new ways to schedule tasks:

是的,Windows 7 任务调度程序允许使用一系列令人眼花缭乱的新方法来调度任务:

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.