A Desktop Shortcut to Eject USB Storage Devices

Ask a question
Before disconnecting a USB storage device from your computer, it's recommended that you eject the device by clicking on Safely Remove Hardware and Eject Media in the Windows notification area (system tray). In doing so, you'll put a stop to the read/write operations between your computer and the USB storage device, which will help to minimize the risk of data corruption or loss.

But if you don't want to go through the same routine each time you need to disconnect a USB flash drive, memory card, or external hard drive from your computer, you can create a desktop shortcut to quickly eject USB storage devices.

A Desktop Shortcut to Safely Remove Hardware

Right-click on an area of your desktop and select New > Shortcut to open the Create Shortcut Wizard:

Copy/paste the following line (case-sensitive) in the Type the location of the item field:
Rundll32 shell32.dll,Control_RunDLL HotPlug.dll
. Once done, click on Next to move to the next screen:

You can rename the shortcut (e.g. Remove USB) by registering a new name in the Type a name for this shortcut field. Click on Finish when done:

The new shortcut will be placed on the desktop.

How To Change the Shortcut Icon

Changing the default icon of a desktop shortcut is a breeze. Right-click on the new shortcut > Properties > Shortcut and click on Change icon:

A dialogue window titled Change icon will appear. Click on the Browse button and search for a file named "shell32.dll":

Once found, select the file (C:\Windows\System32\shell32.dll) and click on Open:

Windows will then display the icons contained in the shell32.dll file. Select the desired icon and click on OK to validate:

How To Assign a Keyboard Shortcut

You can also associate a shortcut key with your new desktop shortcut. Head back to the Properties menu and define a key combination in the Shortcut key field:

Click on Apply > OK to save your new settings.

How To Eject USB Storage Devices

Your new shortcut is ready. It will give you a direct access to the Safely Remove Hardware utility. Here, you will find all the USB storage devices connected to your computer. To eject a device, simply select its corresponding entry from the Hardware devices list and click on the Stop button:

Click on OK to validate. Windows will then display a message that reads, “The USB Mass Storage device can now be safely removed from the computer”.

Image: © Milana Basic - Shutterstock.com
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team