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

China☆狼群 提交于 2019-12-12 13:28:53

问题


I'm working on a windows service that needs to simulate input at the windows logon screen. 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. I know there are various types of tools that allow such functionality e.g. 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?


回答1:


SysInternals PSExec has the -x command line switch to run programs on the logon screen.

There is an open source version called PAExec. I guess you'll find some helpful API calls in there. To me it seems the code should be in InteractiveSession.cpp



来源:https://stackoverflow.com/questions/31000071/how-do-i-send-keyboard-mouse-input-to-the-windows-logon-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!