Update: I've confirmed that the following procedures also work for all versions of Windows and Windows Server.
In a previous post I showed how to enable Autologon for workgroup servers and workstations.
Once you join a server to a domain, Windows will automatically delete the AutoAdminLogon value from the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon registry key. This causes the userpasswords2 control to hide the "Users must enter a user name and password to use this computer" check box shown above.
Here's how to get the missing checkbox back and configure AutoLogon:
- Open an elevated CMD prompt and enter the following (all on one line):
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d "1" /f
- Click Start, Run and enter control userpasswords2
- Clear the checkbox for Users must enter a user name and password to use this computer and click OK
- Enter the user name and password that will be used for automatic logon and click OK
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d %USERDOMAIN% /fWhen the computer starts up the account you specified will be logged in automatically. Note that the password is encrypted on the computer.
This tip works for all versions of Windows desktops and servers.
Since you're here, be sure to check out my article about building a super-fast Windows Hyper-V lab server for under $1,000!
Yeah, that Logon expert stuff is spam.
ReplyDeleteIf you want to automate auto-logon, then see this sys-internals tool:
http://technet.microsoft.com/en-us/sysinternals/bb963905.aspx
Thanks, Ryan. I deleted the spam comment. I usually catch these before they get posted.
ReplyDeleteUnfortunately none of the 2 suggestions worked on HPC Edition of Server 2008; anything special blocking this in the registry of this ditro?
ReplyDeleteSorry, you can't get there from HPC Edition. It lacks the binaries for the Windows Desktop Experience, which Aero requires. See http://tinyurl.com/yc9dvda
ReplyDeleteWorked first time for me!!!!!!!!
ReplyDeleteThanks for the tip
Thank you. Very helpful!
ReplyDeleteWorked for me! I have Windows Server 2008 R2 Standard.
ReplyDeleteThanks!
Worked for me on the primary GC server. Thanks !!
ReplyDeleteExcelent Thanks! work in Windows 2008 Terminal Server
ReplyDeleteYep! Worked for Foundation Edition R2 2008
ReplyDeleteyou also need to add DefaultUserName
ReplyDeleteand set AdminAutoLogon to 1
then when you run "control userpasswords2" you'll be able to set the logon username/password (event if you're in a domain).
If you are already in the registry, just add the following keys as well to the same keys:
ReplyDeleteAutoAdminLogon 1
DefaultDomainName domain.com
DefaultUserName Administrator
DefaultPassword Password
http://technet.microsoft.com/en-us/sysinternals/bb963905.aspx
ReplyDeleteeverytime I change the Value of AutoAdminLogon to "1", it is changed back after every restart to "0" :(
ReplyDeleteYou can create a .reg file and then execute it.
ReplyDeleteWindows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultDomainName"="DomainNameGoesHere"
"DefaultUserName"="Administrator"
"DefaultPassword"="AdminPasswordGoesHere"
I created a .bat file out of these instructions to make using this at a later time easy. Copy/paste this into a textfile and rename that file to xxxx.bat (where xxxx can be anything you like, as long as windows likes it too, eg, no : / etc...)
ReplyDeleteThis script is tested on a win 2008 R2 server.
----------------
@echo off
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d "1" /f >nul
echo In the following dialog, check and uncheck the
echo "users must enter their username and passwords to login", and hit apply.
echo.
echo Specify the username as: DOMAIN\Username or it will attempt to logon
echo locally.
echo.
set /p q=Press {enter} to continue.
control userpasswords2
--------------
This technique, and the previously posted batch file have been succesfully tested on Windows XP. I'm fairly certain that this won't work on windows 2000 though.
ReplyDeleteThanks Ipchip
ReplyDeleteWorked like a charm! :D
Got it done in 5 minutes! THANK YOU!
ReplyDeleteGot it done in 5 Minutes. THANK YOU!!
ReplyDeleteThanks, works perfectly
ReplyDeleteThanks, works perfectly
ReplyDeleteAlso make sure that SYSTEM has Full Control permissions on HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
ReplyDeleteMany Commenters are suggesting just entering the registry commands including the DefaultPassword entry. (security violation in most companies!) The "Control userpasswords2" command will encrypt the password and keep security happy(er)!
ReplyDeleteI also find the the normal autologon configuration procedures will fail in Windows Server 2008 R2 until I added the following registry entry. Done throu an administrative command prompt in this case:
Reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon” /t REG_DWORD /v ForceAutoLogon /d 1 /f
Worked for me first shot, and the auto login was onto a domain network, now when guests are around i dont need to log the machines on of a morning :)
ReplyDeleteWindows Server 2008 R2 in workgroup was set.
ReplyDelete"AutoAdminLogon"="1"
"DefaultUserName"="Administrator"
"DefaultDomainName"=
And this not work. Why?
On my Windows 7 control autologon by AutoAdminLogon, 1 or 0.
The DefaultPassword parameter in the register isn't present on win2008 and win7.
Why logon expert is spam? I tried it and it's really do everything that advertised and no password in registry as your method does... strange classification of spam
ReplyDelete