Enable Autologin on Windows and lock the screen

Windows 8.1 Logo

If you like me often power up your computer and go away to do some other stuff (read: getting some coffee) while waiting for Windows to startup, you might find this tip handy. What this tip can do for you, is to autologin your computer to startup background jobs, tray icons and whatever else that is auto starting on your computer and then lock the screen automatically.

Enable Autologin and then auto-lock the screen

Autologin is easy to do, but instead of leaving your computer open for anyone you might want to actually lock the screen and let all the programs startup in the background. Whenever you come back all you have to do, is to login and everything is started up and you are ready to go.

Let me take you through the steps to make this work.

First enable autologin

Go to Start -> Run

Type the command: control userpasswords2 as shown below

run control useraccounts

Clear the check box: User must enter a user name and password to use this computer and confirm your password for your login.

useraccount autologin

Second you need to create a shortcut that lock your screen

Make a shortcut with the following location: %windir%\System32\rundll32.exe user32.dll,LockWorkStation and put the shortcut in your startup folder in the Start menu to make it execute every time you login (auto login).

Lock Screen shortcut

Startup folder location for Windows 7 and Windows 10: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\ This is where you need to put your newly created shortcut to make your computer auto-lock after login.

All you need to do know is to reboot your computer and see if it works as expected. You should see your computer do the autologin and immediately after lock your screen requiring you to type your password to unlock. When you do unlock your computer you will see that everything is started up and your computer is ready for you.

Please leave me a comment

Hope you like this tip and would love if you would drop me a comment below about this autologin tip.

This tip has only been tested on Windows 7 Ultimate edition and Windows 10 Pro. Not sure if it will work in all editions of Windows.

Related posts

16 Thoughts to “Enable Autologin on Windows and lock the screen”

  1. Interesting. I never knew such technique could be used. I always leave my computer on to start up everything. With your tip, it will make my computer secured. Thanks.

    1. taho

      For solution from the box (good for company network mass deployment) the Logonexpert tool works like a charm — locks workstation after autologon

      All the best,
      Taho

      1. Hi Taho
        I did not knew about that tool. Thank you for sharing here on my blog.
        Have a nice weekend.

  2. andreas

    Hi Thomas,

    Now I know what keeps you on a higher ranking. You really have these good posts! Please do write more for additional knowledge. Keep your blog updated for me.

    Thanks!

    Adreas

    1. Hi Andreas
      Thank you very much. Please come back for more goodies soon 😉

  3. its wonderful to know this tips. It is small but purposeful trick to reduce your extra affords in life. You should write more in this respect.

  4. Kevin

    interesting trip… I wish to learn more of this kind.
    thanks for sharing.

  5. jack

    Another thing I do to keep it simple is that I don’t same my any data on my C: drive. I keep the C: drive only for Windows and programs. In that way it is easier for me to backup and it is a lot easier if I decide to reinstall Windows or upgrade to a newer version.

    1. Hi Jack
      I do the exact same thing. It is for sure easier if you need to reinstall.

  6. schill39

    Hi Thomas,

    You’re a really good writer. I have known lots of information and tips from your articles. Keep it up man. 🙂

  7. Luke

    Hi cheers for this, the backup solution im using on my server wont work unless its logged in, which is all well and good until theres a powercut or someone knocks out a cable.

    so this is dead handy:)

    1. Hi Luke
      Glad I could help you with a solution to your problem 🙂

  8. Hey Thomas,
    Nice tutorial, its new technique i never saw it before.thank you for sharing with us.

  9. utsav

    Nice trick… thanks for sharing
    Any trick for windows 8 like this?

  10. Raheel Arshad

    Hello Dear Thomas, Thank you for sharing such informative tip and it might reduce power up time too 🙂 After following your instructions, I was able to configure my laptop to login automatically. Thanks again and keep your spirit up.

Leave a Comment