EjectUSB is a tool for quickly closing apps running from a USB drive and ejecting the drive from safe removal. It will automatically close all programs running from the drive EjectUSB was run from (host drive), close any explorer windows open to the host drive, remove Windows MUI and MRU entries and recent document shortcuts related to the host drive, and attempt to eject the host drive when done. It can also interface with various utilities to aid in drive ejection.

Alternatively, the program can be run from your hard drive as a tool to restore a computer to its post-boot state. If you have 10-20 windows open, this will quickly and easily close them all, akin to pressing a reset button for your desktop.

This versatile tool has an active discussion thread at the TPFC forum for this utility if you have any questions or suggestions.

Warning: Launching EjectUSB will immediately close all programs running from the host drive and eject the drive without user intervention!

Download the ZIP package and extract to a folder of your choice. Launch EjectUSB.exe.

The program reads its settings from EjectUSB.ini (in the same folder as EjectUSB.exe). If EjectUSB.ini does not exist, the program will run with default settings. EjectUSB also accepts a drive letter or folder path as a command-line argument. Read EjectUSB.txt for more information.

An excellent tool or restoring a computer to its post-boot state. If you have 10-20 windows open, this can be sort of like pressing the reset button on your desktop. Tremendously useful.

A2009-10-25 23:16

can someone please explain to me how to use ejectusb to eject a truecrypt volume? i have read through the forum post for eject usb, but do not quite understand how to make it work and don't want to risk losing my data....btw, im using geek.menu

EjecetUSB is an amazing tool! This is a definately must have!!! You can even add this exe to the shell so when you right click your flash drive you can check "EjectUSB"Just add:Shell\EjectUSB=EjectUSBShell\EjectUSB\command=PortableApps\ejectUSB\EjectUSB.exe

To your autorun.inf to add EjectUSB to the right click menu. :)

Earl2008-09-27 05:41

EjectUSB works perfectly for me too. I've been using it on XPsp2, 98/ME and XPsp3, and so far it's done what it supposed to do, which kill any handler that run from USB and eject the device.

The only (slight) problem i had ever experience was when i first used it on XPsp3 while there are 2 USB drive currently plugged at once, and both drive ejected when i execute the tools. But as i said it just slight problem because it works fine the second time and so on (don't know what cause it).

Anyway, thanks a lot for the tools, still used it now :)

armin2008-08-04 20:28

version 1.3 is out now!

Relequestual2008-07-20 10:04

Love it. Works like a dream. Time for a quick ol review on ma webiesite (appaholic.co.uk) *plugs* sorry.

linuxamp2008-07-08 06:02

Can anyone recommend a good program which can eject all removable drives at once? I'm very good about closing my apps but it's such a pain to have to use the "safely remove..." when I have three devices I need to eject.

Js2008-07-06 13:32

Good tool, but my USB Apps are into TrueCrypt ... any option to Unmount also the TrueCrypt Volume ?

Thank for this usefull stuff.

Js

Shodan2008-07-05 05:21

Works great for me on Vista Business. Definitely saves a few mouse movements. THANKS !

Queue2008-07-04 18:34

Ooh, thanks for the idea tkoun. Automatic unsubst'ing will be a feature in EjectUSB 1.3.

tkoun2008-07-02 08:57

ejectUSB works perfectly for me,it would be useful if it could also unmount portable drive paths assigned to drive letters through the subst DOS command

slimeruk2008-06-23 11:28

Failed to work for me consistently on XP SP3. Didnt work 1st attempt. Worked perfect 2nd time, 3rd time in started killing processes on my main hard drive. All taskbar items items greyed out.

Thanks for the effort though. :-)

pandor2008-06-23 02:54

doesn't work if any process previously uses resources from usb (for example: making cobian backup to usb, after closing application, folders, etc. and no way to eject usb in any way)

m4rc02008-06-21 02:37

I tried 1.1 but 1.0 performs better.

Queue2008-06-17 14:30

By default (and by design) EjectUSB has no means of closing ANY open file handles to the drive you're attempting to eject; if you have Notepad (running off the local system) open and viewing a file on the drive you're attempting to eject, EjectUSB will not close Notepad unless you've downloaded Handle from Sysinternals and put it in the same folder as EjectUSB (see the documentation for more information).

EjectUSB, by default, closes programs (and only programs) running from the specified location, closes Explorer windows open to the specified location (simply for convenience and screen cleanup), cleans basic Windows MRU and MUI entries related to the specified location from the registry and deletes Recent Document shortcuts related to the specified location. It then invokes Windows safely remove hardware dialog and manipulates said dialog to attempt ejection (or runs one of the ejection helper utilities if present).

@Gregg: There are many situations that I haven't accomodated yet; for example, WMP on Vista has a habit of blocking a drive ejection due to an open file handle to wmpinfo.xml. In addition, I've never personally had the opportunity to test EjectUSB on Win2000; only 98SE, XP SP3, and Vista SP1. Under normal circumstances it should work, but there are many unaccounted for variables that can interfere; I suggest you check the documentation and download one of the ejection helper utilities and see if that works for you.

@fang: Other than expecting it to close Notepad, you used EjectUSB correctly. Simply putting it anywhere on a removable drive and then running it will attempt ejection.

fang2008-06-17 13:31

No luck. Didn't eject my USB drive nor close notepad. I double clicked the exe from the root of my usb drive assuming that the program gets its path from the OS and closes every app running off that drive letter and any other handles off the drive then ejects the drive in a way that the app itself doesn't lock the drive.

Keep trying and thanks for your efforts.

Gregg2008-06-17 11:39

I had high hopes that this would eject my usb on a PC running Win2000. Unfortunately, no good. I even closed all apps running off of the usb drive. Something must be running in the background which this app is unable to kill.

MiDoJo2008-06-16 15:34

(Original Vista SP1 Beta tester for Eject)I'm using this program with My Memory Stick and it works great, though sometimes I get the problem m4rc0 talked about.@m4rc0 you can still yank the stick after it says it can't unmount it. go ahead and check the forum for some of my posts

warpwiz2008-06-16 15:18

My 1st exposure to this app. I had Firefox portable running + a directory window open to the USB drive. I clicked the icon and everything closed up and the drive ejected without a problem. Nice little app.

m4rc02008-06-15 14:17

@queue: I placed USB Disk Ejector in the same folder and now the flash drive is ejected automaticly!!!! ... I love your tool... This feature is missing from Pstart but adding your util to the menu it adds the missing fuvtionality.... THANKS!!

m4rc02008-06-14 16:37

@Queue: I have the same problem as bizgo. The programs running from the usb drive are closed when executing your util. But the drive doesn't get ejected. It stays mounted in windows. Only one time it did fully disconnected from the OS....

I am running Vista Home premium Dutch.

Queue2008-06-14 01:33

@bizgo: Certainly. =)

If you opened EjectUSB.txt, it would be your local version of Notepad.exe (or whatever program is associated with text files) viewing the file; EjectUSB can only enumerate open file handles with the help of Handle (by Sysinternals). EjectUSB's normal behavior is to only close programs running from a specific location, not any program that is currently viewing a file that exists within a specific location. Now, I'm not positive that Notepad would even prevent a drive from being ejected, but assuming it would, having that text file open could be preventing the drive from ejecting.

There's also the chance it could be a language issue; while I tried to make EjectUSB as non-dependent on language settings as possible, there's the chance that may be the cause. I had no opportunity to test on non-English Windows installs, but made window searching based on window properties rather than strings that would vary between languages.

Just tested EjectUsb (great tool from what I read so far on the forum) on a fresh installed Win XP Professional 2002 SP2 German edition. The drive doesn't get ejected. I opened the EjectUsb.txt by double-clicking it and it didn't close after running EjectUsb either. Windows exploer window got closed and another program running from the drive as well. I could see the windows dialog to eject the drive for about 1 second but then the drive is still there and can be navigated as before. Using original .ini without any modification.