Windows 7 Autologon only works after second application

Configuring Autologon on a Windows 7 Device is actually pretty easy. You specify a few Registry Keys and most of the time you are good and your Device is performing an Autologon from this time on.

Generally you have to ask yourself if an Autologon, especially in Company Networks, is a good idea because of potential Security Risks. However, there are always some exceptions like Production Terminals, Kiosk Computers, etc.

For configuring Autologon, I always used the following PowerShell Script, which is setting the required Registry Keys:

Today, I had a pretty weird issue. After running this Script on a Windows 7 Computer and performing a Restart afterwards to test the Configuration, Windows didn’t perform an Autologon and stopped normally on the User Login Screen. Looking again in the Registry, I noticed that the previously set Registry Value AutoAdminLogon was reset to 0 and DefaultPassword was deleted.

Now to make this even more interesting, after running the same script again a second time and perform a Reboot afterwards, Autologon worked without any issues.

After a few hours of troubleshooting and monitoring the Registry on different steps, I figured out that after you apply the Script for the first time and perform a reboot, the existing Registry Value AutoLoginCount was deleted as well with DefaultPassword.


The Resolution I came up with, was to modify my above script to set the needed Registry Values for Autologon and afterwards delete the AutoLoginCount Value

With this modification, Autologon was working again on the first try. 🙂

I hope the above information will help you if you experience the same Problem.

Windows 7 Autologon only works after second application
5 (100%) 2 votes


  1. Cantoris 21. April 2016
  2. Bob 17. October 2016
  3. Bob 17. October 2016
  4. John 1. September 2017
  5. diagg 31. October 2017

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.