Tweak: Auto-login on Startup & Lock PC Immediately
May 11, 2008 : Permalink :
Update: Works on Windows 7 as well.
This tweak initiates the User’s logon/startup sequence before locking Windows 7/Vista/XP; thus, speeding up the OS startup process while maintaining the security provided by the login screen.
What it solves: Traditionally, you turn on your computer and wait a few minutes. Then, you log into windows and wait a few more minutes. This tweak eliminates that wasted time by allowing you to turn on your computer, go work on something else for a few minutes, come back, login and begin working immediately because your profile and startup programs have already loaded! It is particularly useful for people who are the sole or primary user of their PC and use the login screen purely as a security mechanism.
I couldn’t find a streamlined step-by-step guide online so I figured I’d put one together myself. Sources are credited below.
Step 1: Auto-Login on Startup.1
- In Vista/7, Click Start, type netplwiz in the search field, and hit Enter.
In XP, Click Start, click Run, type control userpasswords2
(This loads the Advanced User Accounts control panel). - Uncheck the Users must enter a user name and password to use this computer option.
- Click Apply.
- Enter your password into the Automatically Log On dialog box that pops up and click “OK“.
Step 2: Lock PC Immediately after Login.2
- Click Start -> All Programs, right-click on the Startup folder, and select Open.
- The Explorer Window opens. Right-click in the whitespace and point to New and click Shortcut.
- The Create Shortcut Wizard opens. In the text box, type the following:
rundll32.exe user32.dll,LockWorkStation - Click Next.
- Enter a name for the shortcut (e.g., “Lock Workstation“).
- Click Finish.
Step 3: Reboot.
Step 4: Enable Power-On Security.
- Please view your BIOS Security options and enable the power-on password feature. Otherwise, you run the risk of allowing someone to boot to safemode without any password access (as pointed out by a commenter).
Tags: 

February 5th, 2009 at 3:16 pm
This is a great time-saving and security tip for Vista! With it, a user can get all services started and the PC fully operational without having to come back to the PC to login initially and then wait to have all of these services load. Locking the PC immediately on boot-up is a very important consideration for security, to keep others out that should not have access to the PC, and it good that you included it. I copied the shortcut of locking the PC to my Desktop as well to give me a quick and easy way to lock my PC if I want to step away from my PC without leaving it exposed to someone else accessing it. Just as a note, "Login automatically and Lock PC immediately in Vista" would have been a better title for your tip that would allow search engines to find it and rank it higher when a user searches for this topic.
March 4th, 2009 at 7:52 am
Thank you very much.
I think this is not for Vista home because mine does not work.
May 17th, 2009 at 10:53 pm
Thanks
helped alot
May 17th, 2009 at 11:53 pm
Thanks
helped alot
June 2nd, 2009 at 2:08 am
I was just looking for a way to lock my pc when going away from my desk. This solution is great and clean. Thanks a lot for posting it.
June 11th, 2009 at 10:40 am
There is a security risk involved here: if somebody boots the computer in safe mode the start-up files are disabled and so the computer will automatically log in (eventually to your admin profile) but it will not lock. Any idea how to fix this?
June 11th, 2009 at 11:33 pm
Using a boot-time password would alleviate this security risk because it would require a password before presenting an option to enter safemode.
Thanks for the comment. I'll update the post to address this.
June 16th, 2009 at 9:16 am
Not sure if safe-mode boot can be controled via BIOS security as it is 'Windows' Safe-mode … F8 key pressing or interrupting a normal boot will automatically show “Safe-mode” as an windows boot option.
June 16th, 2009 at 4:37 pm
So, on my Lenovo T60p, there is a BIOS option called “power-on password”. This means that as soon as I hit the power button, I'm presented with a password field. Without entering the correct password, I can't access the BIOS or even boot from device/disk (so, no OS can be loaded w/o a pw; hence, no ability to hit F8 to get the Windows options).
June 17th, 2009 at 10:20 am
Oh, I now understand your reply and you are right, but this bios feature is not available for any BIOS.
Anyway, with BIOS password you only move the login option from the OS log-in to the BIOS log-in, but still have to log-in before your programs are loaded.
Using this BIOS login you can as well disable Windows Login and only lock computer at start-up.
Also using BIOS password you cannot schedule your computer to automatically boot up at a specific time and have everything waiting for you when you sit in front of your desk
June 17th, 2009 at 4:54 pm
The solution I posted, combined with a BIOS pw, resolves the wait-time issue by putting the pw prompt at the beginning of the process instead of in the middle of it.
The only thing I can think of to securely get around your use case is to put your computer in a hibernation state rather than shutting it down. Is that an option?
Let me know if you come up with anything.
June 17th, 2009 at 5:54 pm
The solution I posted, combined with a BIOS pw, resolves the wait-time issue by putting the pw prompt at the beginning of the process instead of in the middle of it.
The only thing I can think of to securely get around your use case is to put your computer in a hibernation state rather than shutting it down. Is that an option?
Let me know if you come up with anything.
May 20th, 2010 at 12:16 pm
Thank you for your good article for it to learn and understand more about my work in it. Hope you'll have great articles like this again
July 17th, 2010 at 3:59 pm
This will be great if it will work. Thanks for sharing it.
July 17th, 2010 at 11:59 am
This will be great if it will work. Thanks for sharing it.