Have programs that need to run automatically on your machine and need to auto login and lock your server or computer at startup? Here’s a simple way with the use of a couple free programs.
Autologin
Install Autologin by Sysinternals.
Autologon enables you to easily configure Windows’ built-in autologon mechanism. Instead of waiting for a user to enter their name and password, Windows uses the credentials you enter with Autologon, which are encrypted in the Registry, to log on the specified user automatically.
Autologon is easy enough to use. Just run autologon.exe, fill in the dialog, and hit Enable. To turn off auto-logon, hit Disable. Also, if the shift key is held down before the system performs an autologon, the autologon will be disabled for that logon. You can also pass the username, domain and password as command-line arguments:
Autolock
While Autologin by Sysinternals provides an encrypted way to autologin with your credentials, you may still want to autolock your server or computer after bootup. Auto Logon & Lock provides a way to both autologin (PCs) and autolock (PCs and servers) your system after bootup and autologin.
1) Run “Lock.exe” from the archive to test if the application runs without errors. If all is well your desktop should lock. Logon again and Windows Explorer should be open. You might want to create a System Restore Point before proceeding just to be safe.
2) Copy the files “Lock.exe” and “LockCMD.exe” to your Windows directory. (Ex: C:\Windows)
3) Run “lockcmd.reg” from the archive and click Yes in the dialog box. You must run this while logged on to the account which you want to enable auto logon for.
lockcmd.reg contains the following script which runs the .exe to autolock your computer at startup.
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System] “Shell”=”%windir%\\lock.exe”
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot] “AlternateShell”=”lockcmd.exe”
1. In the Users tab, uncheck the box next to Users must enter a user name and password to use this computer.
2. Click on the Apply button at the bottom of the User Accounts window.
Your system should now be able to boot up automatically and lock itself!