[Guide] Lock Windows 10 and turn off the display with one click

Windows 10 offers a quick way to lock the current session using the Win + L keyboard shortcut. However, there’s no shortcut or button that lets you turn off the display and this behavior is controlled only by the power management settings. However, we have a simple solution that lets you lock Windows 10 and turn off the display with one click.

It’s a convenient solution to rely on when you know you’re leaving the PC for a while, and you want to be able to lock the PC and turn off the display on demand.

How to lock Windows 10 and turn off the display with one click

Even though the trick I’m going to show you is definitely useful you should still adjust the period after which the display automatically turns off in power management settings.

Getting back to the purpose of this guide, if you want to lock Windows 10 and turn off the display with one click you will need to use a simple script (no scripting knowledge needed). To run it, we will need to install a free utility called Nircmd, which you can download from the link below.

Download Nirsoft Nircmd

For now, leave the tool where you saved it. To continue, follow the instructions below to create a new .VBS file.

lock Windows 10 and turn off the display with one click

Right-click on th Start button and select ‘Run’ from the context menu or simply press the Win+R key combination. A new Notepad file will open. Copy and paste the text below into Notepad:

Dim WSHShell

Set WSHShell=WScript.CreateObject(“WScript.Shell”)

WSHShell.Run “Rundll32.exe user32.dll,LockWorkStation”, 0

WSHShell.Run “nircmd.exe monitor async_off”, 0

lock Windows 10 and turn off the display with one click

Now go to the File menu and select ‘Save iem’. In the “Save as” dialog, point to the folder where you want to save the script and set the file name to “lock.vbs” (including the double quotes).

lock Windows 10 and turn off the display with one click

Now move the nircmd.exe file you downloaded in the same folder with the .VBS file.

From then on, you can double-click the “lock.vbs” file when you want to lock Windows 10 and turn off the display at the same time. This also works for Windows 8.

For quick access you can create a desktop shortcut for the “lock.vbs” file or even pin it to the Start Menu.

Connect with us on Facebook, Twitter, and Google+.