Number of posts: 52
Registration date: 2009-02-28
|Subject: Automatically Close Running Programs and Eject USB PenDrive 23rd May 2009, 9:15 pm|| |
When you want to eject a connected USB drive from a computer, you’ll have to close all the programs that are ran from USB flash drive, or else you’ll get the error message saying “The device ‘Generic volume’ cannot be stopped right now. Try stopping the device again later.” Sometimes even after closing every possible application that is ran from the USB flash drive, you still can’t successfully stop the device. If this happens on my own computer, I have no problems with this issue because I could use Unlocker to unlock processes in use to successfully remove the drive.
This would be a problem when this happens to my flash drive that are connected to other computer which doesn’t have Unlocker installed. If I simply unplug my USB flash drive without safely removing it first, there is a risk of data corruption on my flash drive. I recently found a small tool from called EjectUSB which seems to be pretty interesting. From the name of that tool, it seemed like a normal utility to eject a plugged in USB drive but it actually does more than that.
EjectUSB is designed to be a simple utility to close all programs running from a specified drive or folder and then attempt ejection if a drive was specified. Extended functionality includes flushing the file cache, closing Explorer windows and removing registry entries and Recent Document shortcuts referencing the specified drive or folder.
There is no interface for EjectUSB. All you need to do is extract the zip file to your USB flash drive, and then run EjectUSB.exe whenever you want to eject your USB flash drive.
You might be thinking what is the difference between ejecting the USB drive using this tool and the built-in Safely Remove Hardware in Windows? The good thing about EjectUSB is it automatically closes all running programs running from the USB drive. This way it’s very unlikely you’ll get the error that your device cannot be stopped now.
There’s also a settings.bat file where you can access the configuration of EjectUSB. As you can see, it is also able to perform cleanup functions, remove related Subst entries and many more which the Safely Remove Hardware is NOT capable of doing.
Other than using this tool to eject a plugged in device, you can also use it to close running programs that are ran from the partition where EjectUSB is. Let’s say you run a game that is installed in D: drive. If you have EjectUSB in D: drive as well, double clicking it will close the game. However this won’t affect the programs that are ran from other partitions such as your C: drive. EjectUSB can definitely work like a boss-key function to quickly shut off programs that can get you fired
Your antivirus might warn you that EjectUSB is a trojan but it’s not. That is the side-effect of EjectUSB being an AutoIt3 script. You do not need to worry if you’ve downloaded it from the official EjectUSB website
Download EjectUSB from here.