locked
Credential Provider - detect "Lock screen" and submit button question RRS feed

  • Question

  • I have created a Credential Provider and all is working nicely, but am stuck on how to:

    1. Detect (or be notified) that the "Lock screen" on Windows 10 has been slid up and the Credential Provider is ready for input.   ICredentialProviderCredential::SetSelected is called while the "Lock screen" is still down and covering the Credential Provider input.

    2. Programmatically 'click' the submit button, so that ICredentialProviderCredential::GetSerialization is called and the user is logged on.
    • Edited by ArtooAU Tuesday, March 22, 2016 8:37 PM using a better term for 'slidey cover screen'
    Tuesday, March 1, 2016 9:12 PM

All replies

  • Any 'Credential Provider' experts willing to give this a crack?
    Tuesday, March 22, 2016 8:38 PM
  • Nope...no one knows. :(
    Thursday, June 30, 2016 11:02 PM
  • I'll tell you what I've done, based off a culmination of many different sources.

    1.a. I'd recommend hiding the "Lock Screen" which you can do with group policies, gpedit.msc - start gpedit, and go to Computer Configuration > Administrative Templates > Control Panel > Personalization and right click "Do not display lock screen" and "Edit", choose the "Enabled" radio button and "Apply" it.

    1.b. You have the right idea with Set Selected, this will fire when your tile is active. Which should be immediately if it is the default and the Lock Screen is disabled per above.

    2. You can programmatically click the submit button with this line:

    &ICredentialProviderEvents::CredentialsChanged;

    This will only work if you have the auto login set in the CredentialProvider::SetSelected set to TRUE per below

    IFACEMETHODIMP Credential::SetSelected(__out BOOL* pbAutoLogon)
    {
        // We don't do anything special here, but this would be the place to react to our tile being selected
        *pbAutoLogon = TRUE;
        &ICredentialProviderEvents::CredentialsChanged;
    }
    As above, I happen to have the call to CredentialsChanged inside my SetSelected implementation and this works for me. I have username and pw fields auto filled with some junk (and hidden) so I don't hit any errors and then I submit all this to a plugin (I'm using pGina) which reads from a USB device to authenticate truly.


    • Edited by Jraff Thursday, July 7, 2016 6:46 PM
    Thursday, July 7, 2016 3:06 PM
  • Thanks Jraff! I'll give your suggestions a go.

    Does it use the same ICredentialProvider object to enumerate the ICredentialProviderCredential objects when CredentialsChanged() is called?

    If so, I can store which
    ICredentialProviderCredential  should 'autologon' in my ICredentialProvider object, then call CredentialsChanged().

    Thanks again!
    Thursday, July 7, 2016 9:22 PM
  • HI Jraff,

    I'm Using  Windows 10 ,

    I'm followed your steps but I'm getting blue screen not getting unlocked screen.I'm so struggling in auto unlock windows user when getting lock screen,(and want press submit button automatically while getting lock screen), and where I can store password securely.

    Thanks

    Gs

    • Proposed as answer by Gowthaman_Gs Thursday, January 9, 2020 12:20 PM
    • Unproposed as answer by Gowthaman_Gs Thursday, January 9, 2020 12:20 PM
    • Edited by Gowthaman_Gs Thursday, January 9, 2020 12:38 PM Missed some words
    Thursday, January 9, 2020 12:19 PM
  • HI Jraff,

    In Windows 10 , I'm so struggling in auto unlock windows user when getting lock screen,(and want press submit button automatically while getting lock screen), and where I can store password securely.

    Thanks

    Gs



    Thursday, January 9, 2020 12:20 PM