Create a Shortcut or Hotkey to Eject the CD/DVD Drive

After writing articles about how to open the Safely Remove dialog as well as eject a specific USB drive, some readers contacted me asking me to write about how to eject a CD or DVD drive instead, so I’m covering that here.

There’s a number of ways to accomplish this, but the best way is to use the NirCmd utility from the excellent Nirsoft. It does a lot more than just eject the cd-rom drive, so be sure to read the information on their site about all the capabilities.

Create a Shortcut to Eject the CD/DVD Drive

Right-click on the desktop or elsewhere and choose New \ Shortcut.

create-a-shortcut-or-hotkey-to-eject-the-cddvd-drive photo 1

In the location box, put the full path to the nircmd.exe file that you downloaded, and append the “cdrom open” command to the end of it, adjusting the drive letter to match your disc drive:

“C:\path\to\nircmd.exe” cdrom open D:

Note the location of the quotes.. if you are using a path with spaces in it, you need to make sure the quotes are only around the path to the executable, and the arguments should be placed after the quote.

create-a-shortcut-or-hotkey-to-eject-the-cddvd-drive photo 2

Give the shortcut a meaningful name, like Eject CD or something like that, and you’ll have a new icon (read below on how to use the cd-rom icon as shown)

create-a-shortcut-or-hotkey-to-eject-the-cddvd-drive photo 3

You can move the icon to anywhere you’d like… double-clicking on it will immediately eject the drive.

Create a Shortcut to Close the CD/DVD Drive

You can follow the same exact instructions as above, but instead of “cdrom open” just substitute “cdrom close”.

Assign a Hotkey to the Shortcut

Now that we have a shortcut, we can assign a hotkey to the shortcut by right-clicking on the icon and choosing Properties. On the Shortcut tab you’ll see a place to assign the Shortcut key:

 create-a-shortcut-or-hotkey-to-eject-the-cddvd-drive photo 4

Add in the shortcut key and close the dialog. As long as the shortcut is on your desktop you shouldn’t have to restart anything for the hotkey to work. You can also move the shortcut to another folder, for instance your quick launch bar.

Tip: If you add the shortcut to the Windows Vista quick launch bar, you can use the built-in hotkeys instead of bothering to assign one manually.

Assign an Icon to the Shortcut

If you click on the Change Icon button in the properties window, you can give the shortcut a more meaningful icon, perhaps the DVD one you see below.

create-a-shortcut-or-hotkey-to-eject-the-cddvd-drive photo 5

You could choose any icon on the system that you’d like, of course.

Download NirCmd from nirsoft.net

More stories

Hidden Trick to Close Windows Explorer in Windows 7 or Vista

If you want to test an explorer shell plugin or registry hack without having to log off, more technical users will usually just kill the explorer.exe process in Task Manager. Windows Vista has another way to do the same thing that you might not be aware of.

Make iGoogle Your Startup Page in Microsoft Outlook

If you are a Microsoft Outlook user that regularly uses iGoogle as your dashboard, have you ever thought about combining the two? It’s nearly trivial to add your iGoogle page to Outlook and make it the startup page.

Make XP Look Like Vista

If you like the look and feel of Vista but don’t want to deal with the headache of swapping Operating Systems, Vista Inspirat from the folks at Crystal XP might be worth considering.  Unlike an application such as Window Blinds … Vista Inspirat is completely free (although they do encourage

Completely Disable the System Tray on Windows 7 / Vista / XP

If you are the type of person that never uses any applications in the system tray, you might be interested in this registry hack to turn it off entirely. I can’t imagine using my own system this way, but we’re all about providing information.

Manage Your Outlook Email Address Auto-Complete List

Do you ever find it frustrating that you can’t make changes to the auto-complete entries in Microsoft Outlook? Even more annoying is the fact that items in your address book aren’t immediately added to the autocomplete list.

Add A User To Administrator Group

If you have multiple users on your network domain and want to give a user administrator rights you need to add them to the Admin user group. The process is relatively simple, here is how.

Disable Windows Vista’s Built-in CD/DVD Burning Features

The vast majority of people I know use a software like Nero to handle all their CD/DVD burning even though Windows Vista has built-in support for burning. So how do you get rid of the built-in Windows Vista burning features since you don’t need them?