Nirsoft Command Line Tool
Nircmd is a portable program for Microsoft Windows devices that adds new command line options to PCs running the operating system.
Some of the commands that it supports let you turn off the computer or monitor, save Clipboard content to a text file, or empty all Recycle Bins at once. While you get your fair share of basic commands, the use of parameters such as waitprocess, loop, cmdwait or elevatecmd open up new possibilities to run advanced commands as well.
Nircmd can be used to launch an incredible number of commands from the Windows command line, or by utilizing the program from a batch file. The best option is in my opinion to copy it to a system path folder so that the command line tool can be executed from the command line without navigating to its folder first.
You can download Nircmd from the Nirsoft website as a 32-bit or 64-bit version for Windows. The program's page on the Nirsoft website lists dozens of examples of how you can put the program to good use.
The basic command for the tool is nircmd command parameters. There are more than 80 commands to chose from. This includes very specific ones like changing the system volume, to advanced commands that manipulate Registry entries or are executed on remote computer systems.
You find the reference list of commands in the help file that is included in the download.
A practical example that shows the complexity of the command tool would be the command to turn off the computer system. This can be done with nircmd.exe exitwin poweroff. An advanced version in the form of multiremote copy "c:\temp\computers.txt" exitwin poweroff force of this exists that can turn off all remote computer systems specified in the text file computers.txt
Some of the more common uses for the nircmd command line tool are writing and deleting values in the Windows Registry, writing values to ini files, connecting to a VPN network or Internet account, changing file attributes, turning off the monitor or working with remote computers.
A selection of useful commands:
- nircmd regedit "~$clipboard$" - Will open the Registry key that has been copied to the Windows Clipboard
- nircmd.exe service restart [servicename] - Will restart the service specified in [servicename]. Works also with start, stop, pause and setting startup types.
- nircmd.exe setprocesspriority [processname] high / nircmd.exe setprocessaffinity [processname] 0 1 - Change the process priority or process affinity of a selected process.
- nircmd.exe killprocess [processname] - Kills the specified process
The help file that is supplied with the download of the command line tool lists all commands and theirÂ parameters.
Nircmd is a great tool especially for users who write batch files but also for those who like to work from the command line, or want functionality that Nircmd supports but Windows itself does not in an easy form, or at all.Advertisement