简体   繁体   English

如何将键盘和鼠标输入发送到Windows登录屏幕?

[英]How do I send keyboard & mouse input to the Windows logon screen?

I'm working on a windows service that needs to simulate input at the windows logon screen. 我正在开发一个需要在Windows登录屏幕上模拟输入的Windows服务。 Basically move mouse and also forward keystrokes. 基本上移动鼠标并转发击键。 The service will be running with full privileges so that's not an issue. 该服务将以完全权限运行,因此不是问题。 I've looked into SendInput, but it only works for the current session. 我查看了SendInput,但它只适用于当前会话。 I know there are various types of tools that allow such functionality eg remote assistance tools are one example that allow IT support to view the logon screen and provide input as well, so it's definitely do-able, but how? 我知道有各种类型的工具允许这样的功能,例如远程协助工具是一个允许IT支持人员查看登录屏幕并提供输入的示例,所以它绝对可行,但如何?

SysInternals PSExec has the -x command line switch to run programs on the logon screen. SysInternals PSExec具有-x命令行开关,用于在登录屏幕上运行程序。

There is an open source version called PAExec . 有一个名为PAExec的开源版本。 I guess you'll find some helpful API calls in there. 我想你会在那里找到一些有用的API调用。 To me it seems the code should be in InteractiveSession.cpp 对我来说,似乎代码应该在InteractiveSession.cpp中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM