Automatic logon in Windows XP

Topics on this page:

[1] The logon screen

[2] Autologon for one account

[3] Autologon if there is more than one account

[3.1] Classic Windows 2000/domain User Account Control Panel User Accounts applet

[3.2] Microsoft TweakUI for Windows XP

[3.3] Regedit

[4] Logon to different accounts



1. The logon screen

In Windows XP you have the choice of using new XP style logon screen (called the Welcome screen, unless you are in a domain) and the old Windows NT/2000 classic logon screen. You can also bypass the logon screen for faster boot up.


2. Autologon for one account

If on a computer not in a domain there is only one account (besides the root Administrator, normally hidden in the logon screen) and this account does not have a password, Windows XP will logon automatically.

If you have updated a patch that installed Microsoft .Net Framework 1.1 (usually in users with autoupdate enabled) this adds the asp.Net account and would disable autologon if you only have one account before. You can uninstall this update or follow the instructions in KB 827072, or leave it and follow the steps below. This problem has now been fixed in .Net Framework SP1.

If the account has a password use the method below but it would not make any sense to have a password protected account that logons on automatically.


3. Autologon if there is more than one account

If there is more than one account you can enable autologon to one account in various ways: classic Windows 2000/domain User Account Control Panel applet, Microsoft Tweak UI and regedit. Note that this is not advisable generally because of security risk as anyone in front of the computer will be able to start up and logon to this account.


3.1. Classic Windows 2000/domain User Account Control Panel User Accounts applet

Go to Start, Run, (or, [Windows key] + R) type:

control userpasswords2

to open this applet. The command without the "2" opens the ordinary workgroup User Account applet.

In the Users tab, first click on the user name for the account you wish to autologon, then untick the User must enter a user name and password to use this computer item (Fig. 1)

Uer Accounts applet

Fig. 1. User Accounts Users tab.


The Password for [Administrator/User] changes to match the user you've clicked. Click Apply. Then the Automatically Log On dialogue box comes up with the user name displayed. You can change the user in User name box. Type the password (and again to confirm) for the account you wish to logon automatically in the box. Click OK (fig. 2).

Automatically Log On box

Fig. 2. Automatically Log On dialogue box.


3.2 Microsoft Tweak UI for Windows XP

In version 2.0 or 2.10 (for SP1) go to Logon, Autologon and tick Log on automatically at system startup and set your password by clicking the Set Password button (Fig. 3). Please note that TweakUI is unsupported by Microsoft and on the website it says you need to use English (US) as your regional settings.

Fig. 3. TweakUI, Logon, Autologon setting.


3.3 Regedit

The above two methods both edit the registry and you can do the same directly there but it is not recommended. Use the methods above in GUI mode.

Be warned that the password is entered in plain text in the registry. (Apparently TweakUI doesn't do that any more but enter the password in the Local Security Authority database, see Ref. 2 but I've not verified this).

It is inadvisable to copy the registry keys below and import them directly into the registry as reg because you may set the user name and password incorrectly.

Note: I've noticed that now if you use the control userpasswords2 method above, the registry no longer has the DefaultPassword entry. This seems to be the case since SP2. Therefore that is the method of choice. But if you want to enable autologon for unattended installations the registry method is so far the only way.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
REG_SZ = 1

REG_SZ = <user name for the default user>

REG_SZ = <the local computer or domain name>

REG_SZ = <the password for the default account>


4. Logon to different accounts

You can log off from the default account and logon to a different account, or use Fast User Switching. If you wish to bypass the autologon account during start up, press the Shift key during logoff from the default account or during start up (see KB article).



KB 315231 How to turn on automatic logon in Windows XP

KB 827072 PRB: Welcome to Windows Screen Appears When You Start Windows XP After You Install the .NET Framework 1.1

Insider Power Techniques for Microsoft Windows XP, Paul McFedries et al. Microsoft Press, Redmond, 2003.


Copyright � 2003-2004 by Kilian. All my articles including graphics are provided "as is" without warranties of any kind. I hereby disclaim all warranties with regard to the information provided. In no event shall I be liable for any damage of any kind whatsoever resulting from the information. The articles are provided in good faith and after some degree of verification but they may contain technical or typographical errors. Links to other web resources may be changed at any time and are beyond the control of the author. Articles may be added, removed, edited or improved at any time. No support is provided by the author.

This is not an official support page for any products mentioned. All the products mentioned are trademarks of their companies. Edit the registry at your own risk and back up first.

Created 2004. Last updated 10 July 2006