How to display the last user logged in Windows 7 PRO x64 logon

24

Solution 1

it can be done done directly on registry by saving the code in a .reg file and executing it

Windows Registry Editor Version 5.00
[hkey_local_machine\software\microsoft\windows\currentversion\policies\system]
"dontdisplaylastusername"=dword:0

Solution 2

tl;dr:

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\delete_me_to_restore_users_display_on_logon_screen"

Explanation:

so after some googling and messing around I found (thanks to @jonhoo) how it's "done"

Thing is, Windows fails to build user list for LogonUI display if any of keys in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList don't have at least values with names: Flags, ProfileImagePath and State. Then it falls back to showing only Last logged on user and "Other users" button for manual enter of username.

So, to cause this behavior, just add any subkey to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList without any values and you're good. Remove to restore.

I advise calling the new key some way it's clear why it's there and what it does.

And of course, if you have this problem and want to restore user list, check all ProfileList subkeys and and remove ones don't have these 3 values (usual warning: handle registry carefully and backup before doing this of course, aside from accidental errors there are ways to hide user accounts from logon screen even if list can be read, so if you only have one user for example, and it's hidden using SpecialAccounts, you won't be able to logon after restoring user list, because there won't be any users!).

Solution 3

Now that I've read your post again and read this TechNet again, you need to use Group Policy Editor to enable the Classic Logon.

  1. Click Start, type gpedit.msc, and then press Enter. This opens the Local Group Policy Editor with the top-level Local Group Policy object open for editing.
  2. In the editor, expand Local Computer Policy, Computer Configuration, Administrative Templates, System, Logon.
  3. Double-click Always Use Classic Logon.
  4. Select Enabled, and then click OK.

That should invoke the Logon screen rather than the Welcome Screen. It should remember the last user for you.

Share:
24

Related videos on Youtube

Pavel
Author by

Pavel

Updated on September 18, 2022

Comments

  • Pavel
    Pavel over 1 year

    I have a custom policy that allows local B2C account login and login via OpenIdConnect from Azure AD. When User from Azure AD is logging first time in he is redirected to sign up page. The issue is that all fields are filled automatically from the Azure AD token except the email address.

    Why email address in sign up form is not populated automatically? The Azure AD token has the email claim with user's email address.

    • Nauf_M
      Nauf_M over 5 years
      funny thing is, I just found a computer configured this way, and I don't know how it's done. Computer is not in domain and has never been. Also, it's certainly not group policy (I checked all configured gpedit.msc entries, there are few), and not local security policy (I reset it by importing "%SystemRoot%\inf\defltbase.inf"). It's certainly not dontdisplaylastusername, which existed (tho was =0), yet I removed it by hand to ensure. Here's how it looks: photos.app.goo.gl/G95ncCehwR9Ebbki8
    • Nauf_M
      Nauf_M over 5 years
      Interestingly, there are people asking about reversing it, and say it's related to "classic logon" policy option (on Server 2008) social.technet.microsoft.com/Forums/windowsserver/en-US/…. It's not tho, I've tried all 3 modes: Enabled, Disabled and Undefined, with no visible difference.
  • Pedro77
    Pedro77 about 10 years
    I was unable to find this option. Win 7 Pro?
  • CharlieRB
    CharlieRB about 10 years
    Missed that it is Windows 7 PRO, so I changed the answer to what I believe may help you.
  • Pedro77
    Pedro77 about 10 years
    Thanks but I want to display the last user name, and only type the password. Maybe I need to enable the logon screen.
  • CharlieRB
    CharlieRB about 10 years
    I'm having trouble thinking today. You're right. Let me update it again to the actual piece of the article that will help. Sorry for the confusion.
  • Pedro77
    Pedro77 about 10 years
    I did that, no changes. :(
  • CharlieRB
    CharlieRB about 10 years
    Can you log in with the built in administrator account and try the change from there? Maybe there is something with your user account that is not letting it make the changes.
  • Pedro77
    Pedro77 about 10 years
    I'm going to test it, but I think it is not the problem.
  • Yorkziea
    Yorkziea over 7 years
    It is not clear if computer is on a domain. I would assume we have a stand-alone computer and no Global Policies are enforced by a domain admin. "Interactive logon - Do not display last user name" is already disabled(as stated in question). I suppose the answer is already given by @CharlieRB above.
  • Pedro77
    Pedro77 over 7 years
    That is an old question. I'm using Win10 now and I can't test it. @snayob The computer was on a domain and I don't know why but when I tried CharlieRB answer it didn't work.
  • Nauf_M
    Nauf_M almost 5 years
    got an autohotkey script to auto-fix profile list when it gets corrupt