NirCMD: Command-line Swiss army knife for Windows

Members of this site know of my deep esteem for Nir Sofer and his unending output of portable, incredibly beneficial utilities for Windows. NirCMD, now in its 2.0 iteration, is a command-line version of a Swiss army knife, providing dozens

    Requires Free Membership to View

of commands that you can incorporate into scripts or simply invoke by hand from the command line.

Many of the commands are things you might have available in other quick-and-dirty command-line utilities, but NirCmd lets you replace many of them in one package.

NirCmd's syntax is simple enough—nircmd, followed by a number of arguments that describe what to do and how to do it. For instance, nircmd standby puts the system into standby mode; nircmd win min class "IEFrame" minimizes all Internet Explorer windows.

The exact syntax for each command is spelled out in detail in the documentation. (Note: If you get into the habit of using NirCmd from the command line for many things, you can always rename it something shorter like ni to save yourself that many more keystrokes.)

Here's a sampling of the commands available within NirCMD:

  • Shut down, reboot, log off, or put the system into standby mode.
  • Open and close CD/DVD-ROM drives.
  • Change or mute the system volume.
  • Change attributes for a program window, including its size, position, Z-order or transparency.
  • Kill a process.
  • Perform manipulations with the clipboard, including reading or writing the contents of a text file to or from the clipboard.
  • Dump the memory of an active process to a text file.
  • Adjust display settings.
  • Change the time/date stamp for files or folders.
  • Run other applications with special attributes (such as specifying which folder to run in).
  • Create shortcuts to applications.
  • Add, remove or change Registry settings.
  • Send mouse or keyboard events to the system.
  • Open dialog boxes to get user feedback.
  • Perform any of the above actions after an arbitrary pause, or simply pause.
  • Perform any of the above actions on another computer across the network.

The 2.0 version insures that many of the commands, including audio controls, work properly in Windows Vista, and includes many new functions (such as the dialog-box commands).

About the author: Serdar Yegulalp is editor of the Windows Insight, (formerly the Windows Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more than 12 years of Windows experience under his belt, and contributes regularly to SearchWinComputing.com and SearchSQLServer.com.

More information on this topic:


This was first published in June 2007

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.