The username and password prompt at the end of the boot sequence is the root of all security protocols for any operating system worth installing: Windows plays no exception, that's why you should never use the content of this post to setup an automatic logon to your home or work PC.
However, it can be useful to do that on a server machine which has no physical access and is only accessibile via Remote Access: that way you have nothing to worry about, since the user credentials are required during the RDP connection phase. In such scenarios allowing an automatic login would allow you to automatically execute non-service programs requiring desktop access, which you can conveniently run using the Startup folder, the Task Scheduler or similar techniques.
Doing that is as simple as opening the registry editor (Start > Run > regedit), navigate through the following tree item:
and change the following keys:
AutoAdminLogon = "1"
DefaultUserName = <Username>
DefaultPassword = <Password>
That's it, right? Well, not quite. This method would work just fine, but it has a major flaw: the password you set this way will be stored in plain text. That's quite a security issue, expecially if we're talking about the Administrator user.
Luckily enough, there's a free tool that can help us finding a better way to do this: it goes by the name of Autologon for Windows and it's a neat piece of software developed by Mark Russinovich and available for free on the Sysinternals website: the tool basically does the same things shown above, but it will encrypt the password before storing it in the registry file.
Use it is extremely simple: all you have to do is to fill up the username, the password and (optionally) the domain fields and click the Enable button. After doing that, you can revert your system back to the login screen by pressing the Disable button instead.
Keep in mind that you can also temporarily disable the automatic login feature by keeping the SHIFT button pressed during the boot sequence.
Autologon for Windows can be downloaded for free from this page.
That's it for now: happy (auto)logon!