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.


Alex (Alejandro Campos Magencio)