SEARCH

How-To Geek

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

Note: this article doesn’t seem to work correctly in Windows 7, from what we can tell. Please leave a comment if you can tell otherwise.

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.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 08/22/10

Comments (56)

  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/windows-vista/create-a-shortcut-or-hotkey-to-immediately-eject-a-specific-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!

  31. passer-by

    @Flatlinebb

    My job is sitting at a desk overnight; we can use these PC’s if we want, to pass the time between the times we’re needed. These PCs just got very locked-down, though — including removal of the system tray. So they still recognize and show my flash drive, but there’s no visible way to safely remove the drive shy of shutting down the PC.

    This shortcut was *exactly* what I set out to find quickly when I entered “eject flash drive windows” into my favorite search engine. It is the solution to the problem that already existed for me. Finding someone who’d already found it saved me much hunting :) .

  32. jd2066

    I just found the program Desk Drive at http://blueonionsoftware.com/deskdrive.aspx
    It creates and removes shortcuts on the desktop to drives as they appear and disappear.
    I thought I would post it here sense I think someone mentioned wanting something like it.

  33. Angel

    Perfect. I’ve got a dlink hub/peripheral switcher that I have an external drive hooked up to. This will make it much faster when switching between computers.

  34. crz

    THANKS!

  35. Richard

    The “Safely Remove Hardware” icon randomely disappear from my laptop system tray. Your instruction help me safely remove my PCMCIA card and recreate the “Remove Hardware” icon in the system tray.

    Thanks a bunch ;-)

  36. rakesh

    it was really helpful ……………
    but it did’nt appear in the tool bar like before

  37. ripost

    Thanks, that was really helpful. I am running as non-administrator, so just clicking on the “add remove hardware” in system tray does not work. Now I can right click and select “Run as Administrator”.

  38. pandurang

    hi…………
    thanx…..
    it’s very helpfull for me to …..

  39. jami

    this isn’t working for me…

    “The ‘USB DISK 2.0 USB Device is not removable and cannot be ejected or unplugged.”

    :(

  40. deaner

    Thanks, great tip! I’ve figured out how to do a lot of things in XP without a cursor (my touchpad is broken) but this one had me stumped. nice website too

  41. TheAslan

    Is there any chance to remove “remove safely hardware” icon in systray??

  42. abdul samad

    sir, i am using usb pan drive, this pan drive using many computers everyday, i want a softwar when i put usb in any computer my usb all softwar shortcut will appear in the desktop

  43. Eric

    Help! I can no longer run or rather reinstall Alcohol52 or Deamon tools light-
    I always get this error ” internal setup error” and “internal error error code 14″
    My programs were working before.
    Anyone with a fix, Thanks.

  44. Caz

    Hi,

    I would like to use this shorcut on our school network. Presently we have thee group policy setting to block all applications unless the .exe is entered into the list. Ive enetered rundll32.exe but the system still blocks the program/shortcut from initating, any thoughts???

  45. thedaytheearthstoodstill

    I really like how this article is written up; however, if one was to look at the policies radio button tab in their disk drives listed in their computers device manager (with or without the device in the drive) and double click on the device in question and then as I aforementioned, click on the policies radio button tab, one will see by default that most USB devices can be removed from the drive because no write caching is enabled for the device or in windows.
    Which means, one does not have to bring up the dialog at all to remove most USB cards.
    Furthermore, I have tested it by yanking out a test USB SanDisk card (didn’t matter on the size capacity of the card) from the drive and reinserting it several times with no corruption of files.
    The only time it would matter, is if files are being written to the disk when a person yanks the card out.
    Why would one do that anyhow? Also ready-boost may be another reason that one would be wary of because ready-boost dedicates almost if not all of the USB’s resources to enhancing the speed in which the device being delivered to the drive works and responds. (unallocated)
    All in all, since the demise of 3 and 1/2 floppies, write caching being enabled for USB’s would be the only reason to bring up the safely remove hardware dialog. It’s all electronic now, not like a tape cassette rolling over a head or stylus on a record if you will.
    Nice article though!

  46. Justin

    Dear The Geek,

    Why are you so awesome????
    still dont know the answer

  47. Anonymous

    This works on Windows 7 Ultimate 32-bit.

  48. Anonymous

    It works on windows 7 home premium 64 bit

  49. Martgm

    Thank you!!!! I keep losing this shortcut and even the Dell techs and iYogi guys can’t seem to get it back for me! Did all that you said and it works and even has the correct icon! ♥

  50. Erwin

    Thanks mate. This helps me.

  51. Squirrelly

    Thanks for the handy tool! As mentioned by a couple of others, on my XP the icon doesn’t show in the systray quite often. For years I’d been going to My Computer -> Drive -> Properties -> Policies tab, and there would be a link for the Safely Remove Hardware. This is much quicker, obviously! I should have checked long ago. :-)

  52. No Workie

    Does not work in W7 64bit Sp1. when I try to safely eject using the command or shortcut, it errors out saying “the device is not removable and cannot be ejected or unplugged”

  53. Anak

    Also wanted to post that I have WIn7 x64 SP1.

  54. Anak

    Quote:
    If you right click on – Safely Remove Hardware – Then open File location, it points to a rundll32 file in C:\Windows\System32.
    I am not sure how one would write the ‘Code Location’ for the shortcut.
    En quote.

    I found this for the ‘Code Location’ try:
    rundll32 shell32.dll,Control_RunDLL hotplug.dll

    RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

    In comparing the two the only difference is the omission of the .exe, and certain Capitals, but it works for me on my 7x64SP1. ;)

  55. Vaidya

    I get an error Error in shell32.dll Missing entry : Controll_Rundll. I use WinXp SP 3

  56. byte2600

    Just run C:\Windows\System32\DeviceEject.exe for windows 7

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!