Enable or Disable Automatic Login (AutoAdminLogon Registry)
Make Windows log into your account automatically at boot using the Winlogon registry values.
01Command
$ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d yourname /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d yourpassword /f02What it does
When AutoAdminLogon is 1, Windows skips the sign-in screen and logs in the user named in DefaultUserName with DefaultPassword. It's handy for a media PC or kiosk that must come up unattended. To turn it off, set AutoAdminLogon back to 0 and delete DefaultPassword.
03Risk
04Undo
$ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 0 /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f05Sources
- Autologon for WindowsEvidence: Describes the AutoAdminLogon, DefaultUserName and DefaultPassword Winlogon registry values used to log a user in automatically.
Last verified: 2026-09-18 · Category: Security & Privacy
06Related solutions
Understand PowerShell's execution policy scopes and set the one that lets you run your own local scripts without gutting the security model.
Two-step command sequence that makes you the owner of a locked file tree and grants yourself full control — the standard fix for 'Access is denied' on old profiles and OS reinstall leftovers.
Built-in Windows command to compute MD5, SHA1 or SHA-256 hashes of any file.