Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Clear Last User Windows 10

This tools clears the previous user from the Windows login screen.  I use this tool after remoting in to prevent users from locking my account by attempting to log in without changing the user.  I have used this with Windows 10 Enterprise versions 1607 through 1903.  I have not tested it with other Windows editions or versions.  This tool overwrites registry keys USE AT YOUR OWN RISK.

Here are the commands in a copy paste friendly format:

REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI /v LastLoggedOnSAMUser /t REG_DWORD /d 0 /f
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI /v LastLoggedOnUser /t REG_DWORD /d 0 /f
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI /v LastLoggedOnUserSID /t REG_DWORD /d 0 /f
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI /v SelectedUserSID /t REG_DWORD /d 0 /f
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI /v LastLoggedOnDisplayName /t REG_DWORD /d 0 /f

2

Comments

1 comment
Date Votes
  • Yop,

    okay for Windows 7, same keys. 👍

    1