Monday, April 8, 2013

Automatic login and lock in Windows

Lock n' Load

Difficulty: beginner

Yes.  Cheesy title, but effective little tweak I discovered recently.  You know how you start up your computer... wait to get to log in... then enter password... then wait even LONGER as Windows loads up all your startup items?  This is probably one of the reasons why people just prefer to put their computer to sleep/standby all the time or even hibernate.  A few issues: 1) power consumption, 2) time it takes to hibernate (It writes everything on RAM to your hard drive.  It is slow on a mechanical drive and is destructive on a solid state drive.) 3) Even with a SSD, the screen takes a second or two to initialize and show you the login screen -- wasted idle time!  4) Windows seems to behave better when you restart often.

I like to turn on my laptop and then go grab a cup of water or something and I would very much like to have my computer ready to go when I get back.  Even better is if you have startup programs do their thing when you turn on your computer (torrenting, virus scanning, etc.).  The problem with automatic login is it usually requires having no password at all or you can't walk away once you first boot up your system (security risk in public).

*Note: this was done in Windows 7.  It should also work on Vista.  For XP, visit in lieu of the first few steps.
Anyway, here we go:

Step 1:  Hit the start button and type in "netplwiz".  Click the program.

Step 1.  I just cropped out all the whtie space here.

Step 2:  Uncheck the box next to "Users must enter a user name and password to use this computer.  See below.  *At this point you will be prompted to enter your current password to authorize this change.  Yeah - go ahead and do it and hit "OK" to finish.

Step 2.

Step 3:  Go to your start menu and find the "Startup" folder under "All Programs".  Right click it and press "Open".  

Step 3.

Step 4:  Right-click in the window, go to "New >" and click "Shortcut".

Step 4.
Step 5:  In the text field "Type the location of the item:", enter "C:\Windows\System32\rundll32.exe user32.dll,LockWorkStation".  Click "Next", enter a name like "Lock computer" in the next window, and click "Finish".

Step 5

Step 6:  Double check that the new shortcut is working by double-clicking it.  Your computer should be locked.  If this step is successful, try restarting your computer.  You'll notice now on the login screen, it says "Locked" under your username.  SUCCESS!  Your computer has already started loading your items!


Change the icon of the new "Lock computer" shortcut:
1) Find that shortcut again.  (Step 3)
2) Right click it, click properties.
3) Click the "Change Icon..." button.
4) Choose an icon.  I use the yellow square key icon.  I also like the padlock there!  If you don't see any items, enter this into "Look for icons in this file:"  "%SystemRoot%\system32\SHELL32.dll"
5) Hit OK and you're done!

Change the lock/login screen in Windows 7:

Do more to improve bootup times:
1) 'Tis easy: download CCleaner and install.
2) Go to "Tools", then "Startup".
3) Weed out programs that you don't need to start up every time you start your computer.  I disable pretty much anything that isn't "Intel" related.  I keep "F.lux" and "Skydrive" enabled -- very small programs.

*Disclaimer:  I haven't tested this out on a slow system so I'm not 100% sure there isn't a window between automatic login and locking that proves to be a vulnerability.  It happens instantaneously on my laptop.

No comments:

Post a Comment