hook a hotkey from windows logon screen

瘦欲@ 提交于 2019-12-05 02:01:42

问题


i built a program that hooks the keyboard and when some hotkey pressed it openning the door (that connected to the COM1 serial port of the computer).

this works fine, until i locking the computer (winkey+L). i want to be able to open the door with the same hotkey from the logon screen.

i using Windows XP & C#.

how do i do that?

thanks.


回答1:


You need to write a Windows service that does this. Services and drivers can run outside of user logins, and services are a lot easier to write than drivers.




回答2:


you can't. When the screen is locked then mouse and keboard inputs aren't sent to running programs. It's a security thing. If you could communicate with running programs when the screen was locked then what would be the point of locking the screen




回答3:


Yahhhhhhhhhhhh!! i found it!!

This can be done with "psexec /x" from sysinternals.




回答4:


Programs that are running with normal user rights are not allowed to mess with the logon screen for security reasons. This makes it harder for key loggers to see your password.

You need to convert your program into a service. Please see http://msdn.microsoft.com/en-us/library/ms686953(VS.85).aspx for details on how to implement and install a service.



来源:https://stackoverflow.com/questions/1583326/hook-a-hotkey-from-windows-logon-screen

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