Enable or Disable Automatic Login (AutoAdminLogon Registry)

Make Windows log into your account automatically at boot using the Winlogon registry values.

WindowsregistrypasswordssecurityHigh risk
Set AutoAdminLogon, DefaultUserName and DefaultPassword under HKLM\...\Winlogon with reg add to enable auto-login; set AutoAdminLogon to 0 to disable.

01Command

Command
$ 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 /f

02What 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

RiskHigh risk
RequirementsRun Command Prompt as administrator. Only sensible on a single-user machine in a physically safe place.
!Warning: The password is stored in the registry in a readable form, so anyone at the PC (or with access to the file) can recover it — never use this on a shared or portable device.

04Undo

Undo
$ 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 /f

05Sources

  • Autologon for Windows
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: 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