Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried setting the following keys with no effect:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName = username

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword = password

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName = name of localhost

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon = "1"

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\ForceAutoLogon = "1"

What am I doing wrong? How can I make it work? I'm using Win7 x64, but I'm also interested in a way to do it on XP.

Clarification: I need a solution that can be automated, hence I try to use the registry. Anything that requires user interaction is not fit for this question.

share|improve this question
Have you checked superuser.com/questions/88263/… ? –  Jonas Heidelberg Apr 3 '12 at 12:33
I need a solution that can be automated (something that requires user interaction, i.e. press a certain key and check a checkbox is not one) –  Tamás Szelei Apr 3 '12 at 12:35
... you should add that to your question ;-). –  Jonas Heidelberg Apr 3 '12 at 12:36
It IS in my question... "via registry" –  Tamás Szelei Apr 3 '12 at 12:37
Hmm, I see. I tend to pay more attention to the question body than title, and not take things as must-requirements if it isn't mentioned... –  Jonas Heidelberg Apr 3 '12 at 12:38
show 3 more comments

2 Answers

Edit: I understand that your question involves the registry, but as a general rule of thumb I suggest that you should not manually modify the registry unless there is absolutely no other way to do what you want to do.

share|improve this answer
add comment

It sounds as though you have done everything correctly. You should verify that all of the registry values are REG_SZ (String) Values, even the AutoAdminLogon and ForceAutoLogon Values. If they are REG_DWORD Values it won't work. Beyond that the only issue I can imagine is that you have misspelled the username and/or computer name and/or used the wrong password.

If all else fails you can use the the Autologon tool from Sysinternals. It is primarily a graphical application, however you can run it from the command line with the following syntax (make sure that autologon.exe and psexec.exe are in the same directory).

autologon /accepteula username domain password

This method is actually more secure because it will encrypt the password before it is stored. If you set the password in the registery, then any authenticated user can view the password.

If you need to you can use the PsExec utility from Sysinternals to run this command remotely.

psexec \\remotecomputername -c -f -h -u administrator -p adminpassword autologon.exe /accepteula autologonusername domain autologonpassword 

You can run psexec --help for details on what each of the flags mean. But basically, this will copy autologon.exe to the remote computer, and run it as an administrator.

Note: If you are not familiar with Sysinternals, I highly suggest you check out all of the utilities, they are a must have for any system administrator.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.