Changed Last Logged on User

email me

Note, you can manually set the %myVar%, or dynamically pull the information. Originally, I used a specific reg key to return the username I wanted.

reg add “HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI” /v LastLoggedOnUser /d “.\%myVar%” /f

reg add “HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI” /v LastLoggedOnSAMUser /d “%computername%\%myVar%” /f