Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Create a Shortcut or Hotkey for the Safely Remove Hardware Dialog

If you often use removable USB devices like a flash drive, you are probably already familiar with the "Safely Remove Hardware" icon that sits in the system tray. The problem for many people is that the icon is tiny, and clicking it just right to bring up the menu is a pain. Can't we just make a shortcut to bring up the dialog?

Of course you can, and it's really quite easy. Easier than trying to click the tiny icon in the tray, at least…

image

Create a Shortcut to the Safely Remove Hardware Dialog

Right-click anywhere on the desktop and choose New \ Shortcut:

image

Then paste in the following into the location box:

RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

image

Give it a name, and you'll have a shortcut icon…

image

…that will pull up the Safely Remove Hardware dialog.

image

Assign a Shortcut Key

If you want to assign a shortcut key to this dialog, you can right-click the icon and open the properties dialog, then go to the Shortcut tab.

image

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.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 03/14/08 and tagged with: Windows Vista, Vista Tips & Tweaks

Comments (30)

  1. Milan

    Thanks for this shortcut, its really helpfull removing USB Drive.

  2. JoePerkins

    It would be more useful a shortcut to just remove the usb, is that possible? One move only.

  3. The Geek

    @JoePerkins

    Yes, that is possible… I'm going to cover that in another article tomorrow.

  4. Brad

    Umm… thanks for the howto and all, but…. where can I get that Super Mario wallpaper?

  5. The Geek

    @Brad

    I got it from here: http://www.desktopgaming.com

    =)

  6. Alecska

    It works in XP too, thanks ! :)

  7. Albert

    What an amazing article. You find the most random by helpful tweaks ever.

  8. Brian Abrahams

    Thanks - works great. How about "restart computer" instead of "start/shut down/select button" sequence ?

  9. The Geek
  10. Brian Abrahams

    Thanks - I'm using XP but believe it uses the same filename, only the screens have changed to confound the innocent :)

  11. Russ

    Question… do you REALY need to do this?… as long as i have used USB, i allways just yanked it out.. and never had any issues…

  12. Whatisinaname

    If you would also like the "official" icon, right-click on your new shortcut and goto "Properties." In the resulting dialog, goto the "Shortcut" tab and click on the "change icon" button. Browse for the %SystemRoot%\system32\hotplug.dll file (or just copy/ paste) and select one of the icons of your choice.

  13. Dave

    @Russ,

    Not for FAT32, which most removable devices are likely to be formatted with. However, my external drives are NTFS. In order to prevent journaling errors or something else screwy, it's important to let NTFS finish its routines before you remove it from the system.

  14. Rick

    @Russ,

    I wiped my iPod clean doing that.

  15. Flatlinebb

    Why? I don't see the point. Just click once on the removal arrow in the Systray, click on your drive and your done. This is a solution in search of a problem.

    I will give it props for showing us a little insight into how Windows works internally.

  16. faitaccompli

    Isn't it just easier to left-click on the icon and click on the drive that you're removing? I haven't opened up the Safely Remove Hardware Dialog for at least a year.

  17. Brenda B

    This is so great! I'm one of those that can't see with my readers or without! Thanks so much for tip.

  18. Dirk

    Great tip ( as usual ). I`ve always wondered why they would put such a TINY icon to click on hidden in the sys tray, and then tell how an important it is to "remove hardware safetly" but make it inconvinient to do so.
    You know geek, someone like you could probably write some thing do have a pendrive pop up on the desktop when you plug it in, and umount automatcally when your done ike in Linux. Hows that for a challenge :-)

  19. The Geek

    I've just published an alternate method, if you'd like to eject a specific USB drive from a shortcut you can follow this guide:

    http://www.howtogeek.com/howto.....usb-drive/

    @Dirk:
    You know, that's something I've looked into before, I think there's a solution somewhere for that. Will research!

  20. TechnoLaziness

    Thanks for beautiful tip. Anyways is there any utility to pop out the system tray icons like the ALT-TAB does. It can do so with any key in combination with ALT-TAB?

  21. jd2066

    @Dirk: When does it unmount automatically in Linux? To my knowledge you can still have the same problems yanking a disk out in Linux as you can with Windows if you don't tell it to unmount first.

  22. The Geek

    @jd2066:

    What he's referring to is how Gnome adds an icon to the desktop whenever you plug a flash or usb drive in, and then it removes the icon when you remove the device.

    I remember seeing a similar solution for Windows, but I don't think it was finished.

  23. jd2066

    @The Geek: Ok. True, Windows does not put volumes on the desktop.
    A unmount will still have the same effect as Eject or "Safely Remove" on Windows. So removing the USB disk without doing that will have the same problems with both OSes.
    I thought he was confusing the two.

  24. Dirk

    @JD2066:
    actually when you close the folder you had opened on the pendrive ( or sd card ) , it "unmounts it " and mkes it OK to pull it out without damage. When u plug it back in, a cool icon pups up on yor desktop. Pretty neat :-)
    Geek , you really have to figure out how to do this on windows, or at least write more stuff about destop linux :-)

  25. jd2066

    @Dirk: Ok, that is interesting. I was basing this on my experience with Gentoo Linux with ivman and KDE. I guess Ubuntu does things differently. I'll have to try Ubuntu one of these days and check that out.

  26. Yeahoo

    Hey thanks for this tip… I use a lot of Dos batch files and this allows me to bring up the Dialog box From a batch file. example: "%CD%\…..Any Dir.Dos Format~1… \EjectDevice.Lnk"…. So if %CD% is My thumb drive I bring up the Dialog box and safely eject it.

  27. HASH

    @Whatisinaname

    thanks for the tip, i used it and it looks better on the quick launch too. thanks Geek, for finding useful tips and shortcuts for our daily computer uses.

  28. Deb

    What a great tip, some how my computer would not display the safe removal icon on the task bar and I would have to turn the computer off to safely remove my storage drive. This short cut has made my life sooooo much easier…..many thanks!!!!!

  29. michael d.

    I have usb drive without power button. Is there way to detect the drive after I've shut it down with the method described here? It detects it when I take cable off and back on but I wish there was easier way. Thanks!

  30. GJ

    Brilliant! Thanks a bunch!


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.