In this article we will be looking at a free utility called Nircmd which is an excellent tool that offers a lot of features. When used with some imagination, it can accomplish wonders. But first let’s see what Nircmd has to offer.
Nircmd allows you to open the CD tray, dial an internet connection, increase & decrease the system volume, center all windows, remove the title bar from the ‘My Computer’ window, set a window as always on top, hide the start button on the taskbar, change the display mode of your monitor, turn off the monitor, start and stop windows services, write and delete registry entries, clipboard management, take screenshots, connect to a VPN, show/hide the start button, show/hide the clock and much much more.
Quite a handful. Isn’t it? Wait till you hear that it does all this from the command line. Yep! FROM THE COMMAND LINE.
How to Use It:
(1) Download and extract the contents
(2) You will get nircmd.exe along with a help file listing various functions performed by nircmd.
(3) Copy nircmd.exe to C:\windows\system32 or any other folder that is specified in the PATH environment variable.
(4) Run a command!
These are some of the creative ways I could think of using Nircmd. Maybe you can let us know some more? Please mention them in the comments.
Create Shortcuts: nircmd allows you to create shortcuts (on your desktop of anywhere) to run any command. So you want to mute/unmute the system volume by clicking a
shortcut? Use this: nircmd.exe cmdshortcut “~$folder.desktop$” “Switch Volume” mutesysvolume 2
Disable Screensaver: nircmd.exe regsetval sz “HKCU\control panel\desktop” “ScreenSaveActive” 0
Take a screenshot after 30 seconds and save it: nircmd.exe cmdwait 30000 savescreenshot “f:\temp\shot.png”
Start the screensaver: nircmd.exe screensaver
Hide the clock on the system tray: nircmd.exe win child class “Shell_TrayWnd” hide class “TrayClockWClass”
Show the clock: nircmd.exe win child class “Shell_TrayWnd” show class “TrayClockWClass”
These are only some of the examples. You can find the complete list and more in the zip file you download.
You might ask why would you want to use a command line tool? Well if all that it does is not enough to push you then let me suggest some of the benefits of using the command line:
- If thou aspire to be a power user thou shall master “The Ancient Art of Command Line!”
- It’s faster, believe me, even if you have a decent typing speed you will be able to finish your work a lot faster doing it from the command line
- It’s easier to do a number of actions in bulk using the command line. Like copy the files to the specified directory and then rename them all with a common prefix.
- It’s easier to create a batch file and schedule tasks. Let’s say that you want to open the CD Tray at 2 am (it’s a weird one I know, you can laugh) how would you do it? Use Windows scheduled tasks and run the command at 2am. Although you might not gain a lot by doing so but this is just to let you know the power of the command line.
- You can integrate your custom commands into menus.
- You can create shortcuts and thus shortcut keys for your commands or batch files.
(By) – Varun Kashyap, a programmer, blogger and tech enthusiast, who also writes on his TechCrazy Blog (Its been a long time). Now you know he is a busy guy!
More articles about: