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)

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

When do you get frequent flier miles - when you buy, or when you fly?

What exactly is a "Meth" in Altered Carbon?

How do pianists reach extremely loud dynamics?

When were vectors invented?

Why is "Consequences inflicted." not a sentence?

Is it true that "carbohydrates are of no use for the basal metabolic need"?

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

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?

List *all* the tuples!

Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?

Why did the Falcon Heavy center core fall off the ASDS OCISLY barge?

Why are Kinder Surprise Eggs illegal in the USA?

Storing hydrofluoric acid before the invention of plastics

List of Python versions

Can an alien society believe that their star system is the universe?

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

How can I make names more distinctive without making them longer?

Extract all GPU name, model and GPU ram

Why aren't air breathing engines used as small first stages

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

Do I really need recursive chmod to restrict access to a folder?

Compare a given version number in the form major.minor.build.patch and see if one is less than the other

How does debian/ubuntu knows a package has a updated version



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

                      Sum ergo cogito? 1 nng

                      419 nièngy_Soadمي 19bal1.5o_g

                      Queiggey Chernihivv 9NnOo i Zw X QqKk LpB