Freigeben über


How to customize error messages shown when changing password on Windows 7

Hi all,

A customer of mine wanted to change the error messages shown to users when changing their password on Windows 7, e.g. when new and old passwords won't match, or the old password of the user is invalid, etc. On Windows XP they did that with a custom Gina. They wondered if they could do this with Credential Providers now.

And the answe is yes. We may wrap the MS Password Credential Provider. When we fail to change the password, authui!CPasswordCredential::ReportResult returns the error in its ppwszOptionalStatusText out parameter (e.g. "The user name or password is incorrect." in my tests). We should be able to modify that string easily in the credential provider wrapper.

The following Microsoft SDK sample shows how to wrap a provider:

Microsoft SDKs\Windows\v7.1\Samples\security\credentialproviders\samplewrapexistingcredentialprovider

 

I hope this helps.

Regards,

Alex (Alejandro Campos Magencio)

Comments

  • Anonymous
    September 27, 2011
    this is excellent, since it's somethign we would like to do.do you have your sample code available?
  • Anonymous
    September 27, 2011
    No, sorry, I don't have a sample of my own. If I had one, I would have posted it already. My customers used the info above to create their own.Regards,Alex