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

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.


  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?


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.