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

Please sign in to leave a comment.

Didn't find what you were looking for?

New post