One issue that you run into a lot when working in a corporate IT environment is dealing with users who cannot properly eject their USB drives. Normally, instead of just unplugging a USB drive, it’s a best practice to go to the Safely Remove Hardware dialog and stop the device.
When you click Stop, Windows will close off all handles that are currently referencing files on the USB device. However, this does not always work! There are many times where you simply cannot safely remove USB devices unless you restart the computer.
If you are having this issue, you will be happy to learn of a cool software app that can you run from your USB drive to properly close all references.
EjectUSB is a free portable app that will close all programs running from a specified drive or folder and then automatically attempt to safely eject it.
In order to use EjectUSB, download the zip file and extract it into a folder or at the root of your USB device. Now in order to eject your USB drive safely, just run the executable file and EjectUSB will do it’s magic.
Here are all the things that EjectUSB will try to do when you run it:
- Flush the file cache for the target location
- Close all programs running from the target location
- Close any Explorer windows open to the target location
- Remove MUI and MRU entries and Recent Document shortcuts related to the target location
- Attempt to eject the specified drive, if the target location was a drive letter
The whole purpose of this program is to make sure that Windows can eject your USB drive without losing any data. I have heard of several people pulling out USB drive without safely ejecting them only to find that the drives could not longer be read when plugged back in later on.
The other cool thing about EjectUSB is that if it cannot properly eject the USB drive, you can download helper utilities that work in conjunction with EjectUSB to aid in drive ejection.
You can replace the internal ejection function by downloading any of these programs and putting the EXE file in the same folder as EjectUSB:
- RemoveDrive.exe – http://www.uwe-sieber.de/drivetools_e.html#RemoveDrive
- USB_Disk_Eject.exe – http://quick.mixnmojo.com/software#usbdiskeject
- DevEject.exe – http://www.withopf.com/tools/deveject/
- USBDeview.exe – http://www.nirsoft.net/utils/usb_devices_view.html
- AutoStart.exe / AutoEject.exe – http://xpt.nl/products-autostart
If EjectUSB cannot close a program or file handle itself, you can download other programs that are better at it and EjectUSB will use those programs:
- Unlocker.exe – http://ccollomb.free.fr/unlocker/
- Handle.exe – http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ Handle.mspx
From now on, you can safely use USB devices like hard drives and flash drives without worrying about losing your data due to it not being removed properly! Enjoy!
