Auto Logon for Windows XP thru 7

I can never seem to remember the registry settings for this so here it is for review. This works for Windows XP thru 7 to the best of my knowledge.

You can use Registry Editor to add your log on information. To do this, follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  3. Using your account name and password, double-click the DefaultUserName entry, type your user name, and then click OK.
  4. Double-click the DefaultPassword entry, type your password under the value data box, and then clickOK. If there is no DefaultPassword value, create the value. To do this, follow these steps:
    1. In Registry Editor, click Edit, click New, and then click String Value (REG_SZ).
    2. Type DefaultPassword as the value name, and then press ENTER.
    3. Double-click the newly created key, and then type your password in the Value Data box.

    Note: If the DefaultPassword registry entry does not exist, Windows XP automatically changes the value of the AutoAdminLogon registry key from 1 (true) to 0 (false) to turn off the AutoAdminLogon feature after the computer is restarted.

  5. Double-click the AutoAdminLogon entry, type 1 in the Value Data box, and then click OK.If there is no AutoAdminLogon entry, create the entry. To do this, follow these steps:
    1. In Registry Editor, click Edit, click New, and then click String Value (REG_SZ).
    2. Type AutoAdminLogon as the value name, and then press ENTER.
    3. Double-click the newly created key, and then type 1 in the Value Data box.
  6. **********UPDATE FOR WINDOWS 7**********
    In Windows 7, DefaultDomainName has to be specified or else Windows will prompt for invalid user name with the 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.
  7. If the DefaultDomainName does not exist, create a new String Value (REG_SZ) registry key with value name as DefaultDomainName
  8. Exit Registry Editor.
  9. Click Start, click Restart, and then click OK.

If you want to bypass the automatic logon to log on so you can logon as a different user, hold down the Shift key after you log off or after Windows restarts. Note that this procedure applies only to the first logon.

To prevent anyone from logging into the console session you can set the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Value: ForceAutoLogon
Type: REG_SZ
Data: 1


ForceAutoLogon forces the configured autologon account to autologn AND it also logs you back on after you log off. It is designed for machines running as kiosks or other public scenarios where you want the kiosk account to be the only account available. Even if the user manages to fiddle with the machine and log off the kiosk user, the logon system will just log the kiosk user back on.

As a result, setting the ForceAutoLogon setting effectively locks out all users aside from the one you are forcing. If you do this to one of your machines, you’d better have some other way of administering the machine. (Typically, this is done via remote administration.)

I have personally tested this in a domain environment w/ local user accounts and it works fine. We use this for kiosk machines all the time. Make sure when you use this that you’re not auto logging in a privileged account!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s