有没有办法在任务计划程序中检测我的计算机何时插入扩展坞?

发布于 2025-01-16 19:07:09 字数 212 浏览 3 评论 0原文

每次计算机连接到 Surface Dock 时,我都尝试在 Windows 11 Surface 设备上运行 .PS1 脚本。我试图弄清楚是否可以使用任务计划程序在每次 Dock 连接时检测事件,但我似乎无法弄清楚它是哪个事件(或者这是否是错误的方法)。

非常欢迎您提出任何建议!

我尝试通过事件监视器查找 Dock 连接或同时连接的其他设备(如 USB 设备)的事件,但我不太明白

I am trying to run a .PS1 script on my Windows 11 Surface device every time the computer connects to a Surface Dock. I am attempting to figure out if I can use Task Scheduler to detect an event every time the Dock connects, but I can't seem to figure out which event it is (or if this is the wrong way to do this).

Any advice you have would be very welcome!

I tried going through the Event Monitor to find events for the connection of the Dock or something else that also connects at the same time (like a USB device), but I can't quite figure it out

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文