NirCmd - A small system utility program
The Story:
Hello friends..!! For the past few days I got quite addicted to programming. I planned to write a C program for controlling computer hardware. As I feel lazy to press the button for opening DVD drive, I thought of writing a program that will open/close DVD drive on execution. I browsed the internet for references and couldn't find what I needed exactly. But later I found a program 'nircmd' that can be used control the DVD drive. Nircmd is a small command line program that doesn't use any user interface. All is done by creating shortcut to it. It is also useful for various other purposes.How to use?
Download the file, copy nircmd.exe to'C:\Users\<USER-NAME>\bin' for Windows 7 users
'C:\Documents and Settings\ <USER-NAME>\bin' for Windows XP users
If there is no 'bin' folder, create one.
Enter the path C:\Users\<USER-NAME>\bin\nircmd.exe
Add this command line at the end " cdrom open <DVD-drive-letter>:"
So the path is, C:\Users\<USER-NAME>\bin\nircmd.exe cdrom open h:
'h:' is the drive letter for my DVD drive, the command 'open' will open the DVD drive.
Then create another shortcut for closing the drive,
Enter the path C:\Users\<USER-NAME>\bin\nircmd.exe cdrom close h:
'close' command will close the DVD drive.
So, now there are two shortcuts. One for opening DVD drive and another for closing it. Lets assign a shortcut key so that we don't have to double-click the shortcut every time we need to open or close the drive.
Right click 'Open DVD drive' --> Properties. In shortcut key textbox, assign a key. I assigned F6.
Right click 'Close DVD drive' --> Properties. In shortcut key textbox, assign a key. I have assigned F7.
I din't blog this to talk about creating shortcuts for opening or closing DVD drives. I wanted to spread the word about nircmd to people who don't know about it. Apart form controlling DVD drives, nircmd is also used to do various other stuff like
- Changing/Muting system volume,
- Writing/deleting keys in registry,
- Writing values into INI files,
- Dial/connect to VPN,
- Restart/Logoff/Shutdown your computer,
- Creating a shortcut to a file,
- Created/modified date of a file
- Turning off the monitor,
- and many more...
Check out nirsoft.net for the commands
Download:
From nirsoft.net:
Rapidshare link:
Visit nirsoft.net for more details,
I think this was useful.. Until Next Time, See Ya :)
Comments
Post a Comment