问题描述
我有一台Windows XP机器和一台运行Ubuntu的Linux机器.我通过 Synergy 从Windows机器共享键盘/鼠标.我想做的就是每当我锁定/解锁Windows机器时就锁定/解锁Linux机器.
I have a Windows XP machine and a Linux machine running Ubuntu. I share the keyboard/mouse from the Windows machine via Synergy. What I would like to do is lock/unlock the Linux machine whenever I lock/unlock the Windows machine.
因此,我希望能够在Windows锁定或解锁屏幕时运行某种描述的脚本.
So I'd like to be able to run a script of some description when Windows either locks or unlocks the screen.
推荐答案
Windows中的标准方法是编写一个程序包(一个 dll ),该程序包订阅 Winlogon通知事件.
The standard way in Windows is to write a package (a dll) that subscribes to Winlogon notification events.
我不知道有什么工具可以提供一种简便的方法来挂接这些事件,但是如果您确实需要将动作包含在某个特定位置中,则可以使您的程序包从某个特定位置启动脚本.
I don't know of any tool that provides an easy way to hook into those events, but you could make your package launch a script from some specific place if you really need your actions to be inside one.
这篇关于锁定或解锁Windows XP时运行脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!