问题
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