locked
Credential provider, run a command after user is authenticated but before login in to windows RRS feed

  • Question

  • Not sure what the best forum for this is, so feel free to move it.

    OK A bit complicated title but this is what I would like. I have this credential provider sample:https://code.msdn.microsoft.com/windowsapps/V2-Credential-Provider-7549a730

    Now I wish to change it a little bit. After the user is authenticated I want to run a command before logging in to windows. This command needs to be ran for this specific user, so I cant do it before authenticating. (in this case it is a tpmvscmgr.exe command if it matters)

    However I have a hard time understand the c++ code of the sample. From what I understand, the important part is done in CSampleCredential::GetSerialization(..

    I see this in the code:

      // At this point the credential has created the serialized credential used for logon
     // By setting this to CPGSR_RETURN_CREDENTIAL_FINISHED we are letting logonUI know
      // that we have all the information we need and it should attempt to submit the
     // serialized credential.
      *pcpgsr = CPGSR_RETURN_CREDENTIAL_FINISHED;

    And I believe this is where it happens(If I remove the line nothing happens on login) But I just dont know where the *pcpgrs is used and if there is a way to "stop it".

    I cant see *pcpgrs being used anywhere.

    Any help would be appreciated!

    Tuesday, December 13, 2016 10:53 AM