How To Create a Shortcut or Hotkey to Eject a Specific USB Drive

By 08/02/2012How To

Hello lovely people 🙂

A few people have contacted me asking how they can create a shortcut that will immediately eject a specific drive – so, today in our computer repairs how to time that is exactly what we will cover.

While using the built in Windows Dialog is more powerful and would be enough for some people, there are others out there looking for more control and for those of us – there is a small freeware utility called USB Disk Ejector

Please note: This utility only works for ejecting USB devices, so if you need to eject another type of device you’ll have to use the Windows method.

 How to use the USB Disk Ejector from the GUI

This utility is really quite simple … launch it and then either double-click or press enter on the USB device you’d like to eject. And that’s it you are done with quite literally nothing else to do!

How To Create a Shortcut or Hotkey to Eject a Specific USB Drive 1

For the keyboard *ninja’s* out there you can assign a hotkey to the executable though a shortcut that will enable you to operate the entire thing from your keyboard!

For our advanced users – Using from the Command Line

There won’t be any pop-ups to deal with and it will work silently by default. You can use the utility from the command line, and pass parameters to tell it which drive to eject.

Start off by passing in the /? Parameter to show the help dialog:

How To Create a Shortcut or Hotkey to Eject a Specific USB Drive 2

Now that you know the command line options, you can test them out… for example; my flash drive is mounted as my G: drive, so I’d use this syntax:

usb_disk_eject /removeletter G

How To Create a Shortcut or Hotkey to Eject a Specific USB Drive 3

If there is an error you’ll get a message. For instance say you run the command a second time and don’t have the USB mounted you’ll get this message that doesn’t seem to be very accurate

How To Create a Shortcut or Hotkey to Eject a Specific USB Drive 4

If your USB seems to change letters a lot you can use the partial name matching your USB drive, but the syntax will be slightly strange. So to check for a partial name, append * to the beginning of a keyword. Do not put a second asterisk in the search string, as it won’t work.

For instance, the full name of my flash drive is *Memorex TRAVELDRIVE 005B* so I could use the full name:

usb_disk_eject /removename *Memorex TRAVELDRIVE 005B*

Or I could just use *Memorex* as the name instead:

usb_disk_eject /removename “*Memorex”

Note: the /showeject parameter didn’t work for us at all under Vista, but it might work for you.

How to create a Shortcut to Eject a Specific USB Drive

Now that we know how the syntax works, we can include that into a shortcut that can be launched from an icon or hotkey. Right-click on the desktop or elsewhere and choose New Shortcut.

How To Create a Shortcut or Hotkey to Eject a Specific USB Drive 5

In the location box, you’ll put the full path to the USB Disk Eject application file, and then append the /removeletter parameter to the end including the drive letter.

C:path-toUSB_Disk_Eject.exe /REMOVELETTER G

How To Create a Shortcut or Hotkey to Eject a Specific USB Drive 6

Next you will want to give the shortcut a name and now you have an icon you can use to immediately eject the drive:

How To Create a Shortcut or Hotkey to Eject a Specific USB Drive 7

Please note that you could use the /removename parameter instead if you choose.

How to assign a Hotkey to the Shortcut

Now that we have our shortcut, we can easily 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:

How To Create a Shortcut or Hotkey to Eject a Specific USB Drive 8

Now just add in the shortcut key and close the dialog. You should not have to restart anything as long as the shortcut is on your desktop. The shortcut can easily be moved to another folder if needed – for example to your quick launch bar

 For Windows Vista – if you add the shortcut to the quick launch bar you can use the built in hot keys so you won’t need to assign one manually.

 Hope this helped. If you have any questions, call out computer repair lab and we will be happy to help you out.

Over and out

MobileGeekette

Call Now Button1300 883 021