Windows 7 Automatic Login with Domain Account
If you are setting up a dedicated Windows 7 Media Center machine you will not want to have to find your keyboard to log in when the machine is rebooted.
Update: Just use this Winternals tool if you don’t want to mess with the registry.
Open Regedit and Navigate to the following registry key:
- HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon
- Double-click the DefaultUserName entry, type the user name to log on with, and then click OK.If DefaultUserName registry value name is not found, create the new String Value (REG_SZ) with value name as DefaultUserName.
- Double-click the DefaultPassword entry, type the password for the user account under the value data box, and then click OK.If there is no DefaultPassword value, create a new String Value subkey (REG_SZ) with DefaultPassword as the value name.Note that if no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon registry key from 1 (true) to 0 (false) to turn off the AutoAdminLogon feature.
- In Windows Vista or 7, DefaultDomainName has to be specified as well, else Windows will prompt of invalid user name with user name displayed as .username. To do so, double click on DefaultDomainName, and specify the domain name of the user account. If it’s local user, specify local host name.If the DefaultDomainName does not exist, create a new String Value (REG_SZ) registry key with value name as DefaultDomainName.
- Double-click the AutoAdminLogon entry, type 1 in the Value Data box, and then click OK.If there is no AutoAdminLogon entry, create a new String Value entry (REG_SZ) with AutoAdminLogon as the value name.
- If exist, delete the AutoLogonCount key.
- Quit Registry Editor.
- Click Start, click Restart, and then click OK.
This information is just what I was looking for but, unfortunately, it did NOT work for me. I recently set up an HTPC running Win 7 Pro that is part of my Windows Server 2008 R2 domain and, for obvious reasons, I would like it to automatically log in to the domain. I entered all of the registry keys and data as indicated in your article, and I double and triple-checked all settings, but when I reboot my HTPC it still brings the CTRL-ALT-DELETE login screen and does NOT automatically log in. Is there anything else I might be missing?
This worked for me on a vm machine on a Mac. Many thanks!
You must have the Ctrl-Alt-Delete Option turned off in gpedit
1. Open the registry editor by selecting Start, Run, and then typing Regedit.
2. Navigate to
HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsNTCurentVersionwinlogon.
3. Make sure the following keys exist and create them as needed:
a. Name of the key is AutoAdminLogon, type is REG_SZ, and is set to a value of 1.
b. Name of the key is DefaultUserName, type is REG_SZ, and is set to the proper user name.
c. Name of the key is DefaultDomainName, type is REG_SZ, and is set to the proper domain or computer
name.
d. Name of the key is DefaultPassword, type is REG_SZ, and is set to the proper password.
e. Name of the key is ForceAutoLogon, type is REG_SZ, and is set to a value of 1.
f. Name of the key is DisableCAD, type is REG_DWORD, and is set to value of 1.
4. Log off and test the autolgon feature.
The .username was driving me crazy! Thank you, this was exactly what I was looking for. 🙂
Note: I discovered you don’t need the DefaultDomainName entry if you specify DefaultUserName as . Thus, if I was on the ABC domain, and my username was JohnDoe, I would set DefaultUserName as abcjohndoe.
Thanks this also works with Windows 8 and without the ForceAutoLogon key
I know 1 year after…
Just to give correct more secure steps.
When you add manualy defaultpassowrd, it is not crypted in the registry so all you have to do to be correctly more secure (quoted 1st steps from NVH00n) :
1. Open the registry editor by selecting Start, Run, and then typing Regedit.
2. Navigate to HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsNTCurentVersionwinlogon.
3. Make sure the following key exist and create it as needed:
Name of the key is AutoAdminLogon, type is REG_SZ, and is set to a value of 1.
4. Close registry
5. Start, Run (accessible via too) then type
netplwiz
6. Check, then uncheck “Users must enter a user name and password to use this computer” box on top
7. Click “ok” or “apply”
8. Enter domainusername as requested then password twice asked in the same dialogbox
9. click “ok” then reboot to verify if all works good.