Enable auto-logon

4 Min Read

Enabling automatic logon for Windows can be done in two ways (that I know of) for installations connected to workgroup and one way for installations connected to domain.

This works for Windows XP, 2003, Vista, 2008 and most likely NT 4 and Windows 2000. This will not work for Windows 9x/ME.

1. The mouse-clicking way (should work with workgroup installations, only)

Start -> Run -> “control userpasswords2”

Opens up a GUI where you should be able to turn off “Require users to log on”.
This also works on Windows Server 2008 Core.

2. Edit registry

This can be done with regedit.exe or reg.exe (Start -> Run -> “cmd /kreg.exe”).

The values to change or add are under:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

They are:

AutoAdminLogon REG_SZ “1”
DefaultUserName REG_SZ “Username”
DefaultPassword REG_SZ “Password”
DefaultDomainName REG_SZ “Domain or machinename”

One easy mistake to make here is to define AutoAdminLogon as REG_DWORD (if you are used to program against registry, that is): This will not work; AutoAdminLogon should be of type REG_SZ.

Obviously you should replace “Username” with a username and “Password” with a password.

“Domain or machinename” should be replaced


Enabling automatic logon for Windows can be done in two ways (that I know of) for installations connected to workgroup and one way for installations connected to domain.

This works for Windows XP, 2003, Vista, 2008 and most likely NT 4 and Windows 2000. This will not work for Windows 9x/ME.

1. The mouse-clicking way (should work with workgroup installations, only)

Start -> Run -> “control userpasswords2”

Opens up a GUI where you should be able to turn off “Require users to log on”.
This also works on Windows Server 2008 Core.

2. Edit registry

This can be done with regedit.exe or reg.exe (Start -> Run -> “cmd /kreg.exe”).

The values to change or add are under:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

They are:

AutoAdminLogon REG_SZ “1”
DefaultUserName REG_SZ “Username”
DefaultPassword REG_SZ “Password”
DefaultDomainName REG_SZ “Domain or machinename”

One easy mistake to make here is to define AutoAdminLogon as REG_DWORD (if you are used to program against registry, that is): This will not work; AutoAdminLogon should be of type REG_SZ.

Obviously you should replace “Username” with a username and “Password” with a password.

“Domain or machinename” should be replaced with name of machine if you log in with a local account (always if you use workgroup) or shorthand domainname if you log in to a domain.

Warning: Your system administrator might not be impressed with having your username and password here. Always adhere to company policy in this regard.

 

Remember that if your machine often fails with blue screen, power failure or disk removal (typical when you run virtual from external drive and disconnect the drive), you want to disable the shutdown event tracker warning, see post bellow.

 

Regards,
Gorm Braarvig

Share This Article
Exit mobile version