33

If my laptop is connected to power source and is not configured to sleep on lid close (it is connected to power source and is working, I don't want it to sleep. It's compiling my code) if I close the lid, laptop will do nothing. This works as expected, but actually if I have my laptop connected to power source in the office it will be good to lock it if I close a lid. So no one can just open the lid and see my unlocked desktop.

I searched Google and it says that correct use case is to manually lock laptop via Win + L every time before lid is closed. This is OK, but not very secure - after all, I can forget Win + L.

Is there any easy way (maybe some registry value or app) to configure windows laptop so it will lock on lid close even without sleep? Of course I can write app/powershell script for this task, but this is not suitable for non-programmers end users.

2

10 Answers 10

14
+150

There is no built in way to do this, but you could use LidLock for this purpose. It is a GUI tool which can help you what you want to achieve. You can also set it to start automatically with Windows start-up.

enter image description here

enter image description here

You can also set the timer for sleep/hibernate after locking the laptop.

You can read more about this on this article.

0
11
  1. Using Run from the start menu, execute regedit.

  2. Navigate to

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\Power
    
  3. Right click > New > DWORD (32 bits)

  4. Rename it to AwayModeEnabled

  5. Select it > Right click > Change value to 1 (Hexadecimal)

  6. Go to the Power Options settings page and change the lid close action to sleep.

Source: Microsoft Answers - Lock computer on lid close?

6
  • 3
    Checked on Windows 8: Not working, closing lid does nothing: dl.dropbox.com/u/239055/win8_laptop_lid_close_problem.png
    – grigoryvp
    Oct 30, 2012 at 15:53
  • 1
    Sure thing. I just restarted the laptop. closed lid, waited a few minutes and opened lid. Windows instantly displayed my desktop - so no sleep and no lock. Thanks about tag note, added it.
    – grigoryvp
    Oct 30, 2012 at 16:28
  • didn't work on Win10 even after restart. no extra option appeared on the drop down on 'lid close action'
    – Odys
    Sep 6, 2017 at 11:06
  • Couldn't get it working on Win7 as of today. I have tried rebooting as well. Nov 10, 2017 at 20:30
  • Windows 10 has a space or the article had a typo: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
    – Kevin
    Feb 14, 2019 at 19:41
11

I wrote an alternative to the LidLock application suggested in other answers, called LapLock. What it does is simply listen for the lid close event and lock the computer when the event fires. Compared to LidLock mine is very bare-bones (it doesn't even have a UI), but also more lightweight.

7

Here is another way to do it:

Under Choose what closing the lid does, select Do nothing for When I close the lid option.

Now, go to Change screen saver, and select Wait: 1 minutes and check On resume, display logon screen

Now, after closing your lid, for one minute, nothing happens, then it gets locked.

Is that it? No, not exactly. This won't work when any program prevents screen saver: like windows media player or vlc etc.

So, I guess this isn't the perfect solution, but it is one :)

1
  • 4
    This is a good method, but: 1. screen saver will also pop up if i don't close the lid. It's not desirable since laptops are often used for reading etc. 2. If laptop is left at public place, i will need to wait this 1 minute after closing lid before leaving room. Otherwise, it will be a great security hole - any child can open the laptop after i leave and gain access to all my private information.
    – grigoryvp
    Jan 1, 2013 at 13:07
-1

The answer seems to be to change the power plan settings.

On your More Power Options, go to the plan you're using now, click Change Plan Settings » Change Advanced Power Settings » Power Buttons and Lid and change to Never.

4
  • 1
    Click on the battery icon visible on the taskbar of your Windows 8 computer screen and choose "More power options".
    – harrymc
    Jan 1, 2013 at 17:42
  • It have only "Adjust Screen Brightness", "Power Options", "Windows Mobility Center" and "Turn System icons on or off" :(. I'm using Windows 8 Professional 64-bit bought from Microsoft and installed myself, no system modifications.
    – grigoryvp
    Jan 2, 2013 at 11:15
  • Don't you have this option as found on this image? Weird.
    – harrymc
    Jan 3, 2013 at 16:58
  • 2
    Changing the plan this setting to "Never" will not make the computer lock itself when the lid is closed. Therefore this is not an answer to the question. Aug 13, 2016 at 9:24
-1

Power Options--> Choose when to turn off the display (left hand side) --> Change advanced power settings --> Balanced --> Require password on --> ****CHANGE NO TO YES****

1
  • 1
    At least here on Windows 10, there is no "Require password on" setting in the power plan advanced setting list. Aug 13, 2016 at 9:26
-1
  • Go to Power Management
  • Choose your plan like Power Saver
  • Click Change plan parameters
  • On power settings plan click Change advanced power settings
  • Locate the power button and lid, then two options come up: button and lid.
  • Choose Lid and you will see the settings.

See also this video from Microsoft: Change what happens when you close your laptop

1
  • 2
    The settings you're referring to do not include a "lock" option (only sleep, hibernate or shut down). Therefore you are not answering the question. Aug 13, 2016 at 9:36
-1

Window 10 RS4, enable a screensaver with a 3 minute timeout is my solution to a secure desktop/laptop. Sleep is no good for productivity apps running in the background. Closing the lid no longer has this basic option ... AwayModeEnabled did not work either.

> Right click on desktop
> Personalize
> Lock screen
> Screen saver settings
> Select your favourite design
> Wait 3 minutes
> On resume, display the logon screen
-3

This is actually built into the OS:

enter image description here

1
  • 6
    Sorry, but i can't see anything about lock screen on your screenshot. Can you clarify, please?
    – grigoryvp
    Aug 25, 2013 at 14:52
-3

Go to Control Panel, making sure in the top right corner where is says view by you are on Large icons and not category.

Then click on power options chose the side where it says "Choose what closing lid does."

Select sleep for both Plugged in and On Battery press Save Changes

Now open Control Panel again (still in large icon view) click on User Account then click on "Make changes to my account in PC settings"

Where it says "Require password after the display has been off for:" change this to Always require password

You are now done, so now when you shut your lid this will cause your computer to sleep which will cause your computer to lock.

2
  • 1
    But the question explicitly says: "I don't want it to sleep". (Also, sorry, but the above is very hard to read. What about adding some paragraphs by using a blank line? And starting sentences with upper case characters?)
    – Arjan
    Sep 15, 2013 at 12:17
  • 2
    As i mentioned in my question, i don't want it to sleep: it's compiling code, so sleep = bad.
    – grigoryvp
    Sep 15, 2013 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .