How to unlock windows programmatically

做~自己de王妃 提交于 2020-01-23 17:37:08

问题


I would like to make use of my old mirror (by violet) which allow to trigger events when you put and take a rfid tag on/off a rfid tag reader. Using LibMirror I can program events in c# which is quite convienent.

My idea is to lock and unlock my station when I take and put the rfid tag on the mirror.

It is quite easy to lock the station thanks to 2, unlocking however seems more difficult.

Several posts 3,4 on SO show that's difficult but I would like to have an definitive answer.

I must precise that I am not interested in any consideration of security, this much more for the sake of doing it.

EDIT : mirware from violet used to allow this, that's why I am convinced this is possible.

Any clue would be appreciated.


回答1:


No, this is not possible. Is that definitive enough for you?

Whether you're concerned with security or not, the Windows team is and absolutely must be. Consequently, there is no API provided to unlock a secured desktop.

It wouldn't make sense anyway—you have to enter a password in order to unlock the workstation, and how is a function call going to enter a password?

UI automation or whatever some ingenious hacker might cook up isn't going to work because the secure attention sequence (Ctrl+Alt+Del) is required to prevent people from doing precisely this.

The only solution would be to completely replace the Windows security system. On Windows XP, you'd do that by writing a new GINA DLL to replace the standard msgina.dll. Things got slightly more complicated in Windows Vista, where GINA was replaced with the new Credential Providers. You might find this article useful if you're interested in pursuing such a route.



来源:https://stackoverflow.com/questions/8816827/how-to-unlock-windows-programmatically

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