Create Shortcuts to Eject and Close CD/DVD Drive
Saturday, 28 June 2008

Windows already includes the Eject command in the context menu for optical drives. If you want to add the Close Tray option in the context menu for optical drives, then this article is for you.

NirCmd is a small command-line utility written by Nir Sofer that allows you to do some useful tasks without displaying any user interface.

By running NirCmd with simple command-line options, you can write and delete values and keys in the Registry, write values into INI files, connect to a VPN network, restart windows or shut down the computer, create shortcuts to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and lots more…

Shortcuts to Eject / Close CD/DVD Drive

Download Nircmd.zip from Nirsoft.net, unzip and extract the files to a folder. Move the file nircmd.exe to your Windows directory. To create a desktop shortcut to eject the CD/DVD drive tray, use the following command:

nircmd.exe cdrom open drive:

Assuming that F:\ is the drive-letter for your CD/DVD drive, you use the following command:

nircmd.exe cdrom open F:

As you guessed it right, the command for closing the drive tray is:

nircmd.exe cdrom close F:

 

 
< Prev   Next >
Advertisement
© d-PIT, 2007-2010.

Site Disclaimer