Windows7 credential provider to automatically logon user on the hardware event

让人想犯罪 __ 提交于 2019-12-09 18:16:30

问题


I am developing a custom credential provider for Windows 7. My goal is to automatically log-in the user when a certain hardware event occurs. I have read all the MSDN articles related to this, and implemented a simple credential provider that interfaces with the external device to get user name and password and passes it to the WinLogon.

But, I still am stuck with the last piece of the puzzle. Currently the user still has to press the logon button to log himself in. What is the best way to do that automatically?


回答1:


Currently I'm working on the same and I think that

a) in function Provider::GetCredentialCount, you set a pdwDefault and set pbAutoLogonWithDefault to true
or
b) in Credential::SetSelected you set pbAutoLogon to true.

With a) the user has no choice and with b) he has to choose the account first.




回答2:


After you fill credentials data, call ICredentialProviderEvents::CredentialsChanged



来源:https://stackoverflow.com/questions/8619323/windows7-credential-provider-to-automatically-logon-user-on-the-hardware-event

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