I saw this blog post in Life Hacker (Make Windows load your desktop before you log in) and see the interesting idea which I used to do few years ago. That Life hacker post is for home users. It doesn’t apply to the domain computers, obviously. So I decided to explain how to auto logon with Domain account and lock your desktop on start up. Here it is.
- Open Registry Editor (Start Orb –> type Regedit.exe)
- Browse to this location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- Edit DefaultUserName key and type your domain user name
- If doesn’t exist, Create DefaultDomainName (string or REG_SZ) key and edit it with your domain name
- If doesn’t exist, create DefaultPassword (string or REG_SZ) key and edit it with your password
- If doesn’t exist, create AutoAdminLogon (string or REG_SZ) key and edit with “1”.
- Close Registry Editor
- Open Notepad
- Type this: WScript.CreateObject("WScript.Shell").Run("rundll32 user32.dll,LockWorkStation")
- Save it as “LockDesktop.vbs” (NOTE: you have to type script name in double quotes, or it will save it with “.txt” in the end) to a known location (would say Documents\scripts in your profile)
- Click Start –> All Programs. Right click on Startup and select Open.
- On Startup Folder, right click on empty space and select New –> Shortcut.
- Select your script (LockDesktop.vbs) on your saved location and create a shortcut.
- That’s it. Reboot your computer and watch your computer auto login with your account and locks the desktop right away.
Make sure have a plan to change the password when your password expires in the registry (DefaultPassword key). I would create a local user account and have it handy just in case. Enjoy!