Wednesday, 8 June 2011

Enable Autologon for Windows 2008 R2 and Windows 7

When a Windows 7 or WIndows 2008 machine is added to a domain the AutoAdminLogon key is removed which in turn removes the "Users must enter a user name and password to use this computer" check box in the Userpasswords2 control panel applet.

To get the checkbox back :
  1. Open a command prompt and enter reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d "1" /f
  2. Rreplacing [domain] with your domain enter reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d [domain] /f
  3. Click start, run and enter control userpasswords2
  4. Untick Users must enter a user name and password to use this computer and click Ok
  5. Enter the username and password (excluding the domain name) you want to autologon with and click Ok

Now when the machine starts up it will automatically login as the user specified. Note that the password is encrypted.