Getting started

NirCmd: handy Windows shortcuts in one small file

Command Prompt running NirCmd commands to change volume and take a screenshot

Wish you could mute your PC, turn off the screen or empty the Recycle Bin with one click? NirCmd makes that easy.

It’s a tiny command-line tool with dozens of useful actions. Put a command in a desktop shortcut or a script, and you’ve built your own button.

What NirCmd is

NirCmd is a single small file, nircmd.exe. It has no window. You give it a command, it does the job and closes.

It can control sound, the screen, windows, the clipboard, files and more. People use it in shortcuts, batch files and task schedules.

Setting it up

  1. Get the NirCmd ZIP. Prefer the command line? Scoop has it too.
  2. Extract it to a folder such as C:\Tools\NirCmd.
  3. Open Command Prompt in that folder, or add the folder to your PATH.
  4. Type a command and press Enter.

Tip: if you install it with Scoop, you can type nircmd from any folder straight away.

Useful commands to try

Here are some favourites. Copy them as they are.

Command Prompt
nircmd mutesysvolume 2
nircmd changesysvolume 5000
nircmd monitor off
nircmd emptybin
nircmd savescreenshot shot.png
CommandWhat it does
mutesysvolume 2Switches mute on or off
changesysvolume 5000Turns the volume up a little (use a minus number to turn it down)
monitor offTurns the screen off until you move the mouse
emptybinEmpties the Recycle Bin
savescreenshot shot.pngSaves a screenshot to a file

Make a one-click desktop button

  1. Right-click the desktop and choose New → Shortcut.
  2. For the location, type the full path and command, for example C:\Tools\NirCmd\nircmd.exe monitor off.
  3. Give it a name, like “Screen off”, and click Finish.
  4. Optional: right-click the shortcut, open Properties and set a keyboard shortcut.

Now a double-click turns off your screen. Make one for mute, too.

Using it in scripts

NirCmd works well inside batch files. For example, a small script could mute the sound, wait a moment and turn off the screen. You can also run it from Task Scheduler at set times.

Test commands one at a time before you add them to a script. Some actions, like closing windows, happen instantly.

About antivirus warnings

Because NirCmd can control so much, a few scanners flag it. As always, get it from the author’s page or Scoop. If a warning pops up, our antivirus guide walks you through what to check.

A few more commands worth knowing

CommandWhat it does
lockwsLocks your PC, like pressing Win + L
standbyPuts the PC to sleep
clipboard clearEmpties the clipboard
setdefaultsounddevice "Speakers"Switches audio output to the named device

The last one is great for flipping between speakers and a headset with two desktop shortcuts.

FAQs

No. It runs silently, does the task and closes.

Run nircmd mutesysvolume 2. Run it again to unmute.

Yes. Put the full path and command in a desktop shortcut.

Yes. Add a NirCmd command as an action in Windows Task Scheduler.

It can control many parts of Windows, so some scanners label it as risky.

Conclusion

NirCmd packs dozens of handy Windows actions into one tiny file. Mute the sound, turn off the screen, empty the Recycle Bin or grab a screenshot with a single command. Put your favourites into desktop shortcuts or batch files, test each one first, and you’ll have a set of custom buttons that save time every day. Start simple with mute and screen off, then add more commands as you need them.