By default, Windows NT displays the password expiration warning 14 days prior to password expiration. To alter this behavior, edit:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Add Value PasswordExpiryWarning as a REG_DWORD. Set it to the number of days that the warning is displayed before the password expires.