This artilce explains how to automatically log on to a windows account using a username and password.
This is useful when the installation of your program requires restart of computer inbetween like the installation of Visual Studio.
So after the restart there will be no prompt for username and password, the system is automatically logged to the specified user account and the installation will continue.
Another use is the forced login of a user to a specified user account.
This article involves editing of Registry. (Editing of registry should be done with atmost care, since an error can cause the system not to boot. So if you have any doubt or you don’t know what to do, don’t edit registry.)
1. Open the registry editor Start ->Run -> type Regedit -> Enter
2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon key.
3. Create a new String Value DefaultUserName
4. Create a new String Value DefaultPassword
5. Create a new String Value AutoAdminLogon
6. We have created all the String Values needed, now we have to assign data to these String Values
7 Right click on the DefaultUserName String Value and click Modify, in the Value data field enter the Username of the account you want to login automaticaly.
8. Right click on the DefaultPassword String Value and click Modify, in the Value data field enter the Password of the account.
9. Right click on the AutoAdminLogon String Value and click Modify, in the Value data field enter 1.
10. When you restart the computer you will be automatically logged to the user account you provided.

To remove automatic log on
1. Set AutoAdminLogon to 0
2. Delete DefaultPassword Key
Remarks:
After you set the automatic log on, you should remove it after the use. This is because anyone who has access to the key can get the username and password.
During the installation of a program set the registry key just before the computer is going to restart and remove the keys after the computer has restarted and continue with the installation.
Hi,
This was useful.
Thanks,
Paul
thanks. that helps. I have tried this method.