Full Guide: Automatically Lock Windows 7 PC Immediately After Auto-Login (Startup)
Step 1: Create Auto Login For Windows 7
Tip: If you fail, read this tutorial that explains how to auto-login
We explained how to create an auto login for Windows 7 previously, but I’ll summarize it again to make sure you get it all right:
1. Click on Start and enter the command netplwiz and hit Enter
2. UNcheck the box Users must enter a user name and password to use this computer
3. Click APPLY
4. A popup will appear asking you for your password:
5. Once you entered the password and confirmed the auto-login will be setup! Your PC will no longer require a password to start.
Step 2: Create Shortcut To Lock Your PC
We also have a tutorial for this step: Creating shortcuts in Windows 7
6. Next, we are going to create a simple shortcut that will lock your PC. So go to your desktop, right-click on it and select New – Shortcut
7. Copy this bold text rundll32.exe user32.dll,LockWorkStation and paste it into the location field:
8. When that is done, follow the instructions (click next and give the shortcut a name e.g. lock me)
9. Open the Windows Explorer and go to the startup folder location
Location: C:\Users\(username)\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
10. Keep in mind that you have to replace (username) with your own and you have to unhide hidden files and folders as explained on our site countless times.
11. Move the shortcut to the Startup folder either by dragging it or using the shortcuts for copy and paste (CTRL + C and CTRL + V)
12. When that is done your PC will immediately lock right after it starts.
IMPORTANT: If you have a lot of other startup programs it is entirely possible that your PC will take quite a long time to start before it actually runs the shortcut, thus it might not be the best solution but by far the easiest. If you need a more secure solution, let us know. We might come up with some script that runs right after the login process, making this more secure.