Windows 8: How to Lock (not sleep) laptop on lid close?

32

13

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.

grigoryvp

Posted 2012-10-30T14:43:59.580

Reputation: 957

Related SU question: Automatically lock screen on lid close in Windows 7

– Ƭᴇcʜιᴇ007 – 2015-03-24T17:02:51.860

2

@harrymc We've literally just eliminated these sorts of meta tags you added. Please don't create new tags that – by themselves – are meaningless. Thanks!

– slhck – 2013-01-02T11:10:13.247

@slhck: No problem. I have added one back (but more precise). – harrymc – 2013-01-02T11:57:30.333

@harrymc Yup, that's much better. Thank you :) – slhck – 2013-01-02T12:22:17.403

For those interested, related question on SO here.

– Karan – 2013-01-08T17:24:07.227

Answers

14

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.

avirk

Posted 2012-10-30T14:43:59.580

Reputation: 15 151

@ripper234: if you're looking for an equivalent application that is more lightweight and doesn't have an UI, you might be interested in LapLock which I describe in my other answer.

– Etienne Dechamps – 2016-08-13T09:28:56.997

3Is it any website/github for this tool? Starting .exe from some .zip file from web archive is not very secure ^_^". – grigoryvp – 2013-01-02T20:54:18.217

@EyeofHell my apologies to not include the source. I edited it and insert the link of the source article. But its not a git-hub tool. – avirk – 2013-01-03T05:53:10.563

No way to run this as a background UI-less service, right? – ripper234 – 2013-09-30T12:46:26.517

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.

Etienne Dechamps

Posted 2012-10-30T14:43:59.580

Reputation: 1 662

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?

Danny

Posted 2012-10-30T14:43:59.580

Reputation: 164

didn't work on Win10 even after restart. no extra option appeared on the drop down on 'lid close action' – Odys – 2017-09-06T11:06:23.250

Couldn't get it working on Win7 as of today. I have tried rebooting as well. – Roney Michael – 2017-11-10T20:30:27.310

Windows 10 has a space or the article had a typo: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power – kevinf – 2019-02-14T19:41:41.747

3

Checked on Windows 8: Not working, closing lid does nothing: https://dl.dropbox.com/u/239055/win8_laptop_lid_close_problem.png

– grigoryvp – 2012-10-30T15:53:02.493

this might be a stupid question bu have you tried restarting the pc and the trying to make it sleep ? when editing the registry restarting the pc is a good idea. if that doesn't help i don't know. – Danny – 2012-10-30T16:19:33.473

3on another note consider adding the windows-8 tag to your question (and to the tile of your question) as a bonus you'll be participating in the windows 8 contest – Danny – 2012-10-30T16:22:16.213

1Sure 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 – 2012-10-30T16:28:42.783

8

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 :)

Prasanth

Posted 2012-10-30T14:43:59.580

Reputation: 512

4This 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 – 2013-01-01T13:07:30.513

-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

kevinf

Posted 2012-10-30T14:43:59.580

Reputation: 524

-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.

Haven

Posted 2012-10-30T14:43:59.580

Reputation: 23

2Changing 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. – Etienne Dechamps – 2016-08-13T09:24:47.103

It seems that Windows 8 don't have "More Power Options" settings pane. How to find it? – grigoryvp – 2012-12-31T22:15:53.010

1Click on the battery icon visible on the taskbar of your Windows 8 computer screen and choose "More power options". – harrymc – 2013-01-01T17:42:07.493

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 – 2013-01-02T11:15:10.313

Don't you have this option as found on this image? Weird.

– harrymc – 2013-01-03T16:58:04.730

-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

Antanas

Posted 2012-10-30T14:43:59.580

Reputation: 7

2The settings you're referring to do not include a "lock" option (only sleep, hibernate or shut down). Therefore you are not answering the question. – Etienne Dechamps – 2016-08-13T09:36:38.807

-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****

TheAnswer

Posted 2012-10-30T14:43:59.580

Reputation: 7

1At least here on Windows 10, there is no "Require password on" setting in the power plan advanced setting list. – Etienne Dechamps – 2016-08-13T09:26:07.993

-3

This is actually built into the OS:

enter image description here

Dennis

Posted 2012-10-30T14:43:59.580

Reputation: 3

6Sorry, but i can't see anything about lock screen on your screenshot. Can you clarify, please? – grigoryvp – 2013-08-25T14:52:31.603

-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.

ellis n

Posted 2012-10-30T14:43:59.580

Reputation: 1

1But 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 – 2013-09-15T12:17:53.683

2As i mentioned in my question, i don't want it to sleep: it's compiling code, so sleep = bad. – grigoryvp – 2013-09-15T12:35:45.190