Windows 10: How to Lock (not sleep) laptop on lid close? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Command-line (cmd) command to lock a windows machinePrevent laptop from going to sleep when I close the lid, but only if I'm connected to an external displayWindows 8: How to Lock (not sleep) laptop on lid close?Stop laptop from resuming from sleep by opening the lidAutomatically lock screen on lid close in Windows 7Close lid to sleep just about and open lid to wake up asap without requiring password if done soon enoughMy laptop will not sleep when I close the lidSet Windows to prompt for password when opening lid, but not go to sleepDelay sleep/login page when closing laptop lid on Windows?Windows 8.1 Laptop; Is there a way for closed lid to cause sleep but not when there is a monitor hooked up?How to have my laptop go to sleep when unplugged while lid shut? (Don't want it to go to sleep when closing lid and plugged in)

What does the "x" in "x86" represent?

Why are both D and D# fitting into my E minor key?

Why was the term "discrete" used in discrete logarithm?

List *all* the tuples!

In predicate logic, does existential quantification (∃) include universal quantification (∀), i.e. can 'some' imply 'all'?

Output the ŋarâþ crîþ alphabet song without using (m)any letters

What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?

How do I stop a creek from eroding my steep embankment?

Why is "Consequences inflicted." not a sentence?

Storing hydrofluoric acid before the invention of plastics

Can I cast Passwall to drop an enemy into a 20-foot pit?

Using audio cues to encourage good posture

What exactly is a "Meth" in Altered Carbon?

What's the meaning of 間時肆拾貳 at a car parking sign

3 doors, three guards, one stone

Why are Kinder Surprise Eggs illegal in the USA?

How to deal with a team lead who never gives me credit?

Why light coming from distant stars is not discrete?

Check which numbers satisfy the condition [A*B*C = A! + B! + C!]

What is Arya's weapon design?

Is it fair for a professor to grade us on the possession of past papers?

What is known about the Ubaid lizard-people figurines?

How to bypass password on Windows XP account?

How do pianists reach extremely loud dynamics?



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



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Command-line (cmd) command to lock a windows machinePrevent laptop from going to sleep when I close the lid, but only if I'm connected to an external displayWindows 8: How to Lock (not sleep) laptop on lid close?Stop laptop from resuming from sleep by opening the lidAutomatically lock screen on lid close in Windows 7Close lid to sleep just about and open lid to wake up asap without requiring password if done soon enoughMy laptop will not sleep when I close the lidSet Windows to prompt for password when opening lid, but not go to sleepDelay sleep/login page when closing laptop lid on Windows?Windows 8.1 Laptop; Is there a way for closed lid to cause sleep but not when there is a monitor hooked up?How to have my laptop go to sleep when unplugged while lid shut? (Don't want it to go to sleep when closing lid and plugged in)



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








20















If my laptop is plugged in I want closing the lid to automatically lock the computer, without putting it to sleep. I don't see an option to do this in Power Options:



Power screen



Is there a hack to achieve this?










share|improve this question



















  • 6





    This is generally a bad idea: your laptop dissipates a good deal of heat through the keyboard, and if you leave the computer running with the lid closed, you risk overheating things.

    – Mark
    Apr 12 at 21:23






  • 17





    @Mark: ...and yet you can set it to keep running full blast when you close the lid, without frying anything.

    – Sean
    Apr 13 at 3:26

















20















If my laptop is plugged in I want closing the lid to automatically lock the computer, without putting it to sleep. I don't see an option to do this in Power Options:



Power screen



Is there a hack to achieve this?










share|improve this question



















  • 6





    This is generally a bad idea: your laptop dissipates a good deal of heat through the keyboard, and if you leave the computer running with the lid closed, you risk overheating things.

    – Mark
    Apr 12 at 21:23






  • 17





    @Mark: ...and yet you can set it to keep running full blast when you close the lid, without frying anything.

    – Sean
    Apr 13 at 3:26













20












20








20


4






If my laptop is plugged in I want closing the lid to automatically lock the computer, without putting it to sleep. I don't see an option to do this in Power Options:



Power screen



Is there a hack to achieve this?










share|improve this question
















If my laptop is plugged in I want closing the lid to automatically lock the computer, without putting it to sleep. I don't see an option to do this in Power Options:



Power screen



Is there a hack to achieve this?







windows-10 laptop lock-screen lid






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 12 at 17:51







feetwet

















asked Apr 12 at 16:57









feetwetfeetwet

292418




292418







  • 6





    This is generally a bad idea: your laptop dissipates a good deal of heat through the keyboard, and if you leave the computer running with the lid closed, you risk overheating things.

    – Mark
    Apr 12 at 21:23






  • 17





    @Mark: ...and yet you can set it to keep running full blast when you close the lid, without frying anything.

    – Sean
    Apr 13 at 3:26












  • 6





    This is generally a bad idea: your laptop dissipates a good deal of heat through the keyboard, and if you leave the computer running with the lid closed, you risk overheating things.

    – Mark
    Apr 12 at 21:23






  • 17





    @Mark: ...and yet you can set it to keep running full blast when you close the lid, without frying anything.

    – Sean
    Apr 13 at 3:26







6




6





This is generally a bad idea: your laptop dissipates a good deal of heat through the keyboard, and if you leave the computer running with the lid closed, you risk overheating things.

– Mark
Apr 12 at 21:23





This is generally a bad idea: your laptop dissipates a good deal of heat through the keyboard, and if you leave the computer running with the lid closed, you risk overheating things.

– Mark
Apr 12 at 21:23




17




17





@Mark: ...and yet you can set it to keep running full blast when you close the lid, without frying anything.

– Sean
Apr 13 at 3:26





@Mark: ...and yet you can set it to keep running full blast when you close the lid, without frying anything.

– Sean
Apr 13 at 3:26










3 Answers
3






active

oldest

votes


















20














As far as I know, there is no built-in function to achieve this. But you can do this using a third party tool.



One of them is LapLock. This program is a lightweight (<50KB), open source tool and it's developed by Etienne Dechamps.



Steps...



  1. Download the program - https://github.com/dechamps/laplock/releases
    (Download the latest laplock.exe release)


  2. Open the Windows Startup folder by using this run command - 'shell:common startup'


  3. Add laplock.exe to your Startup folder.


You can also use Lid Lock to do this.






share|improve this answer
































    17














    Set "Do Nothing",
    lock your laptop using Windows key+L, and then you can close the lid.






    share|improve this answer










    New contributor




    saidi_amine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.















    • 15





      This is the most practical solution. I am always suspicious of any software that chooses to customize something which Windows has built in. I'm looking at you pre-installed "WiFi Booster/manager" crapware!

      – MonkeyZeus
      Apr 12 at 19:09







    • 1





      It would seem this should be something you can configure in the registry (if not, Microsoft should make it so).

      – Jonathan
      Apr 12 at 20:40






    • 15





      OP: I want closing the lid to automatically lock the computer so this doesn't answer the question.

      – Agent_L
      Apr 13 at 15:39






    • 6





      Please do NOT upvote an answer without reading it carefully. This does NOT answer the question and should be DOWN voted (and I would be willing to bet the OP knows he can manually lock his computer before closing the lid) . The site's value diminishes for everyone if we push non-answers to the top by upvoting them.

      – Jon Bentley
      2 days ago







    • 3





      I'm downvoting this answer because it does not answer the question "how to automatically lock the computer"

      – BurnsBA
      2 days ago


















    8














    Two steps:



    • Capture the close lid event.

    • Trigger a lock-screen event.

    See: Capturing laptop lid closing event in windows?, and Command-line (cmd) command to lock a windows machine.



    From those sources, we can use RegisterPowerSettingNotification and GUID_LIDSWITCH_STATE_CHANGE to detect the trigger, and run:



    rundll32.exe user32.dll,LockWorkStation 


    from the command line to send a lock screen request to the machine.



    I don't know what compilers you have available, or what languages you know, but this information should help you set up a program to do it for you.



    I don't use Windows myself, so I can't build or test it for you.






    share|improve this answer

























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "3"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1424774%2fwindows-10-how-to-lock-not-sleep-laptop-on-lid-close%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      20














      As far as I know, there is no built-in function to achieve this. But you can do this using a third party tool.



      One of them is LapLock. This program is a lightweight (<50KB), open source tool and it's developed by Etienne Dechamps.



      Steps...



      1. Download the program - https://github.com/dechamps/laplock/releases
        (Download the latest laplock.exe release)


      2. Open the Windows Startup folder by using this run command - 'shell:common startup'


      3. Add laplock.exe to your Startup folder.


      You can also use Lid Lock to do this.






      share|improve this answer





























        20














        As far as I know, there is no built-in function to achieve this. But you can do this using a third party tool.



        One of them is LapLock. This program is a lightweight (<50KB), open source tool and it's developed by Etienne Dechamps.



        Steps...



        1. Download the program - https://github.com/dechamps/laplock/releases
          (Download the latest laplock.exe release)


        2. Open the Windows Startup folder by using this run command - 'shell:common startup'


        3. Add laplock.exe to your Startup folder.


        You can also use Lid Lock to do this.






        share|improve this answer



























          20












          20








          20







          As far as I know, there is no built-in function to achieve this. But you can do this using a third party tool.



          One of them is LapLock. This program is a lightweight (<50KB), open source tool and it's developed by Etienne Dechamps.



          Steps...



          1. Download the program - https://github.com/dechamps/laplock/releases
            (Download the latest laplock.exe release)


          2. Open the Windows Startup folder by using this run command - 'shell:common startup'


          3. Add laplock.exe to your Startup folder.


          You can also use Lid Lock to do this.






          share|improve this answer















          As far as I know, there is no built-in function to achieve this. But you can do this using a third party tool.



          One of them is LapLock. This program is a lightweight (<50KB), open source tool and it's developed by Etienne Dechamps.



          Steps...



          1. Download the program - https://github.com/dechamps/laplock/releases
            (Download the latest laplock.exe release)


          2. Open the Windows Startup folder by using this run command - 'shell:common startup'


          3. Add laplock.exe to your Startup folder.


          You can also use Lid Lock to do this.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago









          fixer1234

          19.6k145083




          19.6k145083










          answered Apr 12 at 17:52









          DxTxDxTx

          641317




          641317























              17














              Set "Do Nothing",
              lock your laptop using Windows key+L, and then you can close the lid.






              share|improve this answer










              New contributor




              saidi_amine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.















              • 15





                This is the most practical solution. I am always suspicious of any software that chooses to customize something which Windows has built in. I'm looking at you pre-installed "WiFi Booster/manager" crapware!

                – MonkeyZeus
                Apr 12 at 19:09







              • 1





                It would seem this should be something you can configure in the registry (if not, Microsoft should make it so).

                – Jonathan
                Apr 12 at 20:40






              • 15





                OP: I want closing the lid to automatically lock the computer so this doesn't answer the question.

                – Agent_L
                Apr 13 at 15:39






              • 6





                Please do NOT upvote an answer without reading it carefully. This does NOT answer the question and should be DOWN voted (and I would be willing to bet the OP knows he can manually lock his computer before closing the lid) . The site's value diminishes for everyone if we push non-answers to the top by upvoting them.

                – Jon Bentley
                2 days ago







              • 3





                I'm downvoting this answer because it does not answer the question "how to automatically lock the computer"

                – BurnsBA
                2 days ago















              17














              Set "Do Nothing",
              lock your laptop using Windows key+L, and then you can close the lid.






              share|improve this answer










              New contributor




              saidi_amine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.















              • 15





                This is the most practical solution. I am always suspicious of any software that chooses to customize something which Windows has built in. I'm looking at you pre-installed "WiFi Booster/manager" crapware!

                – MonkeyZeus
                Apr 12 at 19:09







              • 1





                It would seem this should be something you can configure in the registry (if not, Microsoft should make it so).

                – Jonathan
                Apr 12 at 20:40






              • 15





                OP: I want closing the lid to automatically lock the computer so this doesn't answer the question.

                – Agent_L
                Apr 13 at 15:39






              • 6





                Please do NOT upvote an answer without reading it carefully. This does NOT answer the question and should be DOWN voted (and I would be willing to bet the OP knows he can manually lock his computer before closing the lid) . The site's value diminishes for everyone if we push non-answers to the top by upvoting them.

                – Jon Bentley
                2 days ago







              • 3





                I'm downvoting this answer because it does not answer the question "how to automatically lock the computer"

                – BurnsBA
                2 days ago













              17












              17








              17







              Set "Do Nothing",
              lock your laptop using Windows key+L, and then you can close the lid.






              share|improve this answer










              New contributor




              saidi_amine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.










              Set "Do Nothing",
              lock your laptop using Windows key+L, and then you can close the lid.







              share|improve this answer










              New contributor




              saidi_amine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.









              share|improve this answer



              share|improve this answer








              edited Apr 12 at 18:08









              GabrielaGarcia

              726415




              726415






              New contributor




              saidi_amine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.









              answered Apr 12 at 17:27









              saidi_aminesaidi_amine

              2433




              2433




              New contributor




              saidi_amine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





              New contributor





              saidi_amine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.






              saidi_amine is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.







              • 15





                This is the most practical solution. I am always suspicious of any software that chooses to customize something which Windows has built in. I'm looking at you pre-installed "WiFi Booster/manager" crapware!

                – MonkeyZeus
                Apr 12 at 19:09







              • 1





                It would seem this should be something you can configure in the registry (if not, Microsoft should make it so).

                – Jonathan
                Apr 12 at 20:40






              • 15





                OP: I want closing the lid to automatically lock the computer so this doesn't answer the question.

                – Agent_L
                Apr 13 at 15:39






              • 6





                Please do NOT upvote an answer without reading it carefully. This does NOT answer the question and should be DOWN voted (and I would be willing to bet the OP knows he can manually lock his computer before closing the lid) . The site's value diminishes for everyone if we push non-answers to the top by upvoting them.

                – Jon Bentley
                2 days ago







              • 3





                I'm downvoting this answer because it does not answer the question "how to automatically lock the computer"

                – BurnsBA
                2 days ago












              • 15





                This is the most practical solution. I am always suspicious of any software that chooses to customize something which Windows has built in. I'm looking at you pre-installed "WiFi Booster/manager" crapware!

                – MonkeyZeus
                Apr 12 at 19:09







              • 1





                It would seem this should be something you can configure in the registry (if not, Microsoft should make it so).

                – Jonathan
                Apr 12 at 20:40






              • 15





                OP: I want closing the lid to automatically lock the computer so this doesn't answer the question.

                – Agent_L
                Apr 13 at 15:39






              • 6





                Please do NOT upvote an answer without reading it carefully. This does NOT answer the question and should be DOWN voted (and I would be willing to bet the OP knows he can manually lock his computer before closing the lid) . The site's value diminishes for everyone if we push non-answers to the top by upvoting them.

                – Jon Bentley
                2 days ago







              • 3





                I'm downvoting this answer because it does not answer the question "how to automatically lock the computer"

                – BurnsBA
                2 days ago







              15




              15





              This is the most practical solution. I am always suspicious of any software that chooses to customize something which Windows has built in. I'm looking at you pre-installed "WiFi Booster/manager" crapware!

              – MonkeyZeus
              Apr 12 at 19:09






              This is the most practical solution. I am always suspicious of any software that chooses to customize something which Windows has built in. I'm looking at you pre-installed "WiFi Booster/manager" crapware!

              – MonkeyZeus
              Apr 12 at 19:09





              1




              1





              It would seem this should be something you can configure in the registry (if not, Microsoft should make it so).

              – Jonathan
              Apr 12 at 20:40





              It would seem this should be something you can configure in the registry (if not, Microsoft should make it so).

              – Jonathan
              Apr 12 at 20:40




              15




              15





              OP: I want closing the lid to automatically lock the computer so this doesn't answer the question.

              – Agent_L
              Apr 13 at 15:39





              OP: I want closing the lid to automatically lock the computer so this doesn't answer the question.

              – Agent_L
              Apr 13 at 15:39




              6




              6





              Please do NOT upvote an answer without reading it carefully. This does NOT answer the question and should be DOWN voted (and I would be willing to bet the OP knows he can manually lock his computer before closing the lid) . The site's value diminishes for everyone if we push non-answers to the top by upvoting them.

              – Jon Bentley
              2 days ago






              Please do NOT upvote an answer without reading it carefully. This does NOT answer the question and should be DOWN voted (and I would be willing to bet the OP knows he can manually lock his computer before closing the lid) . The site's value diminishes for everyone if we push non-answers to the top by upvoting them.

              – Jon Bentley
              2 days ago





              3




              3





              I'm downvoting this answer because it does not answer the question "how to automatically lock the computer"

              – BurnsBA
              2 days ago





              I'm downvoting this answer because it does not answer the question "how to automatically lock the computer"

              – BurnsBA
              2 days ago











              8














              Two steps:



              • Capture the close lid event.

              • Trigger a lock-screen event.

              See: Capturing laptop lid closing event in windows?, and Command-line (cmd) command to lock a windows machine.



              From those sources, we can use RegisterPowerSettingNotification and GUID_LIDSWITCH_STATE_CHANGE to detect the trigger, and run:



              rundll32.exe user32.dll,LockWorkStation 


              from the command line to send a lock screen request to the machine.



              I don't know what compilers you have available, or what languages you know, but this information should help you set up a program to do it for you.



              I don't use Windows myself, so I can't build or test it for you.






              share|improve this answer





























                8














                Two steps:



                • Capture the close lid event.

                • Trigger a lock-screen event.

                See: Capturing laptop lid closing event in windows?, and Command-line (cmd) command to lock a windows machine.



                From those sources, we can use RegisterPowerSettingNotification and GUID_LIDSWITCH_STATE_CHANGE to detect the trigger, and run:



                rundll32.exe user32.dll,LockWorkStation 


                from the command line to send a lock screen request to the machine.



                I don't know what compilers you have available, or what languages you know, but this information should help you set up a program to do it for you.



                I don't use Windows myself, so I can't build or test it for you.






                share|improve this answer



























                  8












                  8








                  8







                  Two steps:



                  • Capture the close lid event.

                  • Trigger a lock-screen event.

                  See: Capturing laptop lid closing event in windows?, and Command-line (cmd) command to lock a windows machine.



                  From those sources, we can use RegisterPowerSettingNotification and GUID_LIDSWITCH_STATE_CHANGE to detect the trigger, and run:



                  rundll32.exe user32.dll,LockWorkStation 


                  from the command line to send a lock screen request to the machine.



                  I don't know what compilers you have available, or what languages you know, but this information should help you set up a program to do it for you.



                  I don't use Windows myself, so I can't build or test it for you.






                  share|improve this answer















                  Two steps:



                  • Capture the close lid event.

                  • Trigger a lock-screen event.

                  See: Capturing laptop lid closing event in windows?, and Command-line (cmd) command to lock a windows machine.



                  From those sources, we can use RegisterPowerSettingNotification and GUID_LIDSWITCH_STATE_CHANGE to detect the trigger, and run:



                  rundll32.exe user32.dll,LockWorkStation 


                  from the command line to send a lock screen request to the machine.



                  I don't know what compilers you have available, or what languages you know, but this information should help you set up a program to do it for you.



                  I don't use Windows myself, so I can't build or test it for you.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 2 days ago









                  fixer1234

                  19.6k145083




                  19.6k145083










                  answered 2 days ago









                  mazunkimazunki

                  1005




                  1005



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1424774%2fwindows-10-how-to-lock-not-sleep-laptop-on-lid-close%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Tamil (spriik) Luke uk diar | Nawigatjuun

                      Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                      Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?