Display warning messages if a user tries to log on using a non-existing account name, a wrong password or if the account was disabled.
svn path=/trunk/; revision=62468
goto done;
Status = DoLoginTasks(pgContext, UserName, Domain, Password, &SubStatus);
- if (!NT_SUCCESS(Status))
+ if (Status == STATUS_LOGON_FAILURE)
{
-TRACE("DoLoginTasks failed! Status 0x%08lx SubStatus 0x%08lx\n", Status, SubStatus);
+ ResourceMessageBox(pgContext,
+ hwndDlg,
+ MB_OK | MB_ICONEXCLAMATION,
+ IDS_LOGONTITLE,
+ IDS_LOGONWRONGUSERORPWD);
+ goto done;
+ }
+ else if (Status == STATUS_ACCOUNT_RESTRICTION)
+ {
+ TRACE("DoLoginTasks failed! Status 0x%08lx SubStatus 0x%08lx\n", Status, SubStatus);
if (SubStatus == STATUS_ACCOUNT_DISABLED)
{
-TRACE("Account disabled!\n");
- pgContext->pWlxFuncs->WlxMessageBox(pgContext->hWlx,
- hwndDlg,
- L"Account disabled!",
- L"Logon error",
- MB_OK | MB_ICONERROR);
-
+ ResourceMessageBox(pgContext,
+ hwndDlg,
+ MB_OK | MB_ICONEXCLAMATION,
+ IDS_LOGONTITLE,
+ IDS_LOGONUSERDISABLED);
goto done;
}
else if (SubStatus == STATUS_ACCOUNT_LOCKED_OUT)
goto done;
}
}
+ else if (!NT_SUCCESS(Status))
+ {
+TRACE("DoLoginTasks failed! Status 0x%08lx\n", Status);
+
+ goto done;
+ }
+
if (!CreateProfile(pgContext, UserName, Domain, Password))
{
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Logon date: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "Jste přihlášeni jako %s."
IDS_LOGONDATE "Datum přihlášení: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "Sie sind angemeldet als %s."
IDS_LOGONDATE "Anmeldedatum: %s %s"
IDS_COMPUTERLOCKED "Computer ist gesperrt"
- IDS_LOCKEDWRONGPASSWORD "Das Passwort ist falsch. Bitte geben Sie das Passwort erneut ein. Bei Buchstaben des Passworts wird Groß- und Kleinschreibung unterschieden."
- IDS_LOCKEDWRONGUSER "Der Computer ist gesperrt. Nur %s\\%s oder ein Administrator kann den Computer entsperren."
+ IDS_LOCKEDWRONGPASSWORD "Das Passwort ist falsch. Bitte geben Sie das Passwort erneut ein. Bei Buchstaben des Passworts wird Groß- und Kleinschreibung unterschieden."
+ IDS_LOCKEDWRONGUSER "Der Computer ist gesperrt. Nur %s\\%s oder ein Administrator kann den Computer entsperren."
IDS_CHANGEPWDTITLE "Passwort ändern"
IDS_NONMATCHINGPASSWORDS "Die eingegebenen Passworte stimmen nicht überein. Geben Sie das neue Passwort in beide Textfelder ein."
IDS_PASSWORDCHANGED "Ihr Passwort wurde geändert."
+ IDS_LOGONTITLE "Anmeldemeldung"
+ IDS_LOGONWRONGUSERORPWD "Sie konnten nicht angemeldet werden. Prüfen Sie Benutzername und Domäne, und geben Sie das Passwort erneut ein. Bei Passworten wird Groß- und Kleinschreibung unterschieden."
+ IDS_LOGONUSERDISABLED "Ihr Konto wurde deaktiviert. Wenden Sie sich an Ihren Systemadministrator."
END
/* Shutdown Dialog Strings */
IDS_PRESSCTRLALTDELETE "Press Control+Alt+Delete to Logon."
IDS_ASKFORUSER "User name: "
IDS_ASKFORPASSWORD "Password: "
- IDS_FORCELOGOFF "This will log out the current user and lose all unsaved data. Continue?"
+ IDS_FORCELOGOFF "This will log out the current user and lose all unsaved data. Continue?"
IDS_LOCKMSG "Only %s or an Administrator can unlock this computer."
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Logon date: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Logon date: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Logon date: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "תאריך כניסה: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_ASKFORPASSWORD "Kata sandi: "
IDS_FORCELOGOFF "Ini akan mengeluarkan pengguna saat ini dan kehilangan data yang belum disimpan. Lanjutkan?"
IDS_LOCKMSG "Only %s or an Administrator can unlock this computer."
+ IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Logon date: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Dati di accesso: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Logon date: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Logon date: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "Jesteś zalogowany jako %s."
IDS_LOGONDATE "Data logowania: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "Sunteți autentificat ca %s."
IDS_LOGONDATE "Data autentificării: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Дата входа: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_LOGONMSG "You are logged on as %s."
IDS_LOGONDATE "Logon date: %s %s"
IDS_COMPUTERLOCKED "Computer locked"
- IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
- IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
+ IDS_LOCKEDWRONGPASSWORD "The password is wrong. Please enter your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOCKEDWRONGUSER "This computer is locked. Only %s\\%s or an Administrator can unlock this computer."
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_COMPUTERLOCKED "Kompjuter mbyllur"
IDS_LOCKEDWRONGPASSWORD "Fjalëkalimi është gabim. Ju lutem shkruani fjalëkalimin tuaj përsëri. Gërmat në fjalëkalim duhet të shkruhen duke përdorur rastin e duhur."
IDS_LOCKEDWRONGUSER "Ky kompjuter është i bllokuar. Vetëm %s\\%s ose një Administrator mund të zhbllokoj këtë kompjuter."
+ IDS_CHANGEPWDTITLE "Change Password"
+ IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
+ IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_CHANGEPWDTITLE "Şifre Değştirme"
IDS_NONMATCHINGPASSWORDS "Yazıdığınız bu şifreler birbiriyle uyuşmuyor. Her iki metin kutusuna da aynı şifreyi yazınız."
IDS_PASSWORDCHANGED "Şifreniz değiştirildi."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
IDS_CHANGEPWDTITLE "Change Password"
IDS_NONMATCHINGPASSWORDS "The passwords you typed do not match. Type the same password in both text boxes."
IDS_PASSWORDCHANGED "Your password has been changed."
+ IDS_LOGONTITLE "Logon Message"
+ IDS_LOGONWRONGUSERORPWD "The system could not log you on. Make sure your User name and domain are correct, then type your password again. Letters in passwords must be typed using the correct case."
+ IDS_LOGONUSERDISABLED "Your account has been disabled. Please see your system administrator."
END
/* Shutdown Dialog Strings */
#define IDS_CHANGEPWDTITLE 40012
#define IDS_NONMATCHINGPASSWORDS 40013
#define IDS_PASSWORDCHANGED 40014
+#define IDS_LOGONTITLE 40015
+#define IDS_LOGONWRONGUSERORPWD 40016
+#define IDS_LOGONUSERDISABLED 40017
#define IDS_SHUTDOWN_SHUTDOWN 50000
#define IDS_SHUTDOWN_LOGOFF 50001