Step 1: Right-click on the Battery icon in the Taskbar, and then click on Power Options. It will open the Power Options window.
Step 2: In the Power Options window, click on the link that says Choose what closing the lid does.
Step 3: In the next screen, go to the When I close the lid: option. The following four options can be set:
- Do nothing
- Shut down
Select the one that you want to use in the On battery drop-down menu. Select the same option in the Plugged in drop-down menu.
Step 4: Click the Save changes button to save the changes.
Step 5: Close the Power Options window.