开发者

Any windows API to let me re-log in a "locked" windows 7?

I've built a program running on windows 7 to communicate with a usb device "power mate". When I leave my computer, I always press "WIN+L" to lock my computer, and when I get back, I press "CTRL+ALT+DEL" and enter my password to log in the computer. At the same time, the program is running. I'm wondering is there any windows API or something to let me use the usb device to log in the computer? (there is a button on the usb device you can push)

UPDATE:

Thanks guys. It's just an idea when I looked my usb device and asked myself "what can I do for this lit开发者_C百科tle guy?". It's supposed to be fun hobby project and I'm curious to see if it's possible.

The usb device is connected to the computer all the time. And in reality, the usb device can do more than just pushing a button (the product name is "griffin powermate"). My intention is to do some custom action to unlock my computer, such as left rotate 3 turns and push a button 2 times. Anyway, this is really not meant to be a solution with strong security.


You can use the OS's log on provider API (GINA for pre-vista and credential provider for vista and onward) to use your USB device as an alternative credential instead of user name/password.

You also need a driver for the device that can talk to your log on provider and trigger a log on request when a button is pushed. You can use Windows Vista's smart card architecture as a reference.


You could possibly write a credential provider to do this but why? This would effectively give credential free access to your computer. If you want to do that then don't bother locking it in the first place.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜