With Nircmd, locking and shutting down the screen takes place in just one click. Please follow the steps below to know how to set up screen shutdown and lock quickly with Nircmd.
How to Use Nircmd to lock and disable the screen
Step 1: Download Nircmd software to your computer. You can download Nircmd here.
– Unzip the Desktop and rename the folder containing the file to Lock.
Step 2: Open the Notepad tool and copy the following code into:
- Dim WSHShell
WSHShell.Run “Rundll32.exe user32.dll,LockWorkStation”, 0
WSHShell.Run “nircmd.exe monitor async_off”, 0
Step 3: Save the file to lock.vbs and leave it in the Lock folder.
Now, if you want to turn off and lock the screen, just go to the Lock folder and run the lock.vbs file. Or you can leave the lock.vbs file outside the Desktop for convenience whenever you want to turn off the screen.