Tips & Tricks, Tutorials, Hacking, Troubleshooting,

Welcome to the second part of this two-part series about using USB Disk Ejector to easily eject your USB devices and setting up shortcuts with shortcut keys for quicker ejection of your USB drives.

In Part I, we covered using the USB Disk Ejector GUI to eject a USB drive, creating a shortcut and a shortcut key to open USB Disk Ejector, and changing USB Disk Ejector options.

In this post, we are going to discuss using the USB Disk Ejector command line to eject a USB drive and creating a shortcut for ejecting a USB drive by letter.

Make sure you have downloaded and unzipped USB Disk Ejector prior to following the steps in this post. Also, we recommend you go through the steps in Part I before proceeding with the post.

Download USB Disk Ejector from

http://quick.mixnmojo.com/usb-disk-eject-1-2-beta-4-last-beta-before-release-hopefully.

Use the Command Line to Eject a USB Drive

You can also use USB Disk Ejector on the command line in a command prompt window. To do this, open a command prompt window and navigate to the directory containing the USB Disk Ejector .exe file. An easy way to do this is to open Windows Explorer, navigate to the desired directory, right-click on the .exe file, and select Open command window here option from the popup menu. To access this option on the popup menu, see our post, Open a Command Prompt from any Folder in Windows.

Opening command line window

To view a list of commands available for USB Disk Ejector, enter the following line at the command prompt and press Enter.

USBDiskEject_Beta4.exe /?

NOTE: If you have downloaded a different version of USB Disk Ejector, use the name of the .exe file you have.

Getting help about the USB Disk Ejector command line

A dialog box displays, listing all the options available for use with the USB Disk Ejector program on the command line. Click OK to close the dialog box.

Command line help dialog box

To eject a USB drive by letter using the command line (the same task you performed earlier in the GUI), enter the following line at the command prompt and press Enter.

USBDiskEject_Beta4.exe /REMOVELETTER E

NOTE: If you are not in the same directory as the .exe file for USB Disk Ejector, use the full path to the .exe file as follows:

“C:\Users\Lori Kaufman\Downloads\USBDiskEject_Beta4.exe” /REMOVELETTER E

If there are any spaces in the path, use quotes around it.

Using removeletter command

If you run the command for ejecting the same drive once it has already been ejected, the following error displays.

Disk could not be ejected message

To close the command prompt window, enter “exit” (without the quotes) at the command line and press Enter.

Closing the command prompt window

Create a Shortcut for Ejecting a USB Drive by Letter

You can create a shortcut for ejecting a drive by letter, just like you did when you added a shortcut to the desktop for USB Disk Ejector earlier. To do so, right-click on the desktop and select New | Shortcut from the popup menu.

Creating a new shortcut

The Create Shortcut dialog box displays. In the Type the location of the item edit box, enter the command for removing a USB drive by letter from above. Make sure it is the command containing the full path. Click Next.

Typing the location of the item

Enter a name for the shortcut in the Type a name for this shortcut edit box and click Finish.

Typing a name for the shortcut

The shortcut is created on the desktop. You can add a shortcut key to the shortcut the same way you did for the shortcut to USB Disk Ejector. Refer to the steps earlier in this post for instructions.

Shortcut for ejecting drive by letter created

You can also create shortcuts using the command line options in USB Disk Ejector to eject a USB drive by name, like you did in the GUI, and using the other command line options listed on the help screen.

Wrap Up

In this post, we covered using the USB Disk Ejector command line to eject a USB drive and creating a shortcut for ejecting a USB drive by letter.

In Part I of this series, we covered using the USB Disk Ejector GUI to eject a USB drive, creating a shortcut and a shortcut key to open USB Disk Ejector, and changing USB Disk Ejector options.

This series was meant to provide you with a fast, easy, and reliable tool for quickly and easily ejecting USB drives you use often. We hope this tool helps to make your life easier.

No comments:

Post a Comment