Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes when I follow the process to safely remove a USB flash drive, I get told that I can't remove the drive because some programs are using it. However I'm unable to tell which programs these are, so I end up having to close programs - sometimes even randomly.

How do I find out which program is using my USB flash drive?

I've searched the Internet but have found nothing promising; one solution might be via Process Explorer since it shows handles, but I don't know how to use it to solve my problem.

The best solution would be to have a program that can automatically close these programs for me, or at least tell me which programs these are.

share|improve this question
All we can say is Windows is using your flash drive. I think we've all seen this problem. There might be something in Device Manager which allows you to optimise the drive for quick removal. I can't check now ... I'm not using Windows at the moment. – pavium Jun 13 '11 at 13:59
I guess the reason for not showing which program locks it is, that it would be confusing if the program was some system driver ... – user712092 Jun 25 '11 at 20:27
up vote 21 down vote accepted

This tool and this tool both look like they would serve the purpose you are trying to achieve. The NirSoft interface is a little less direct, but I trust the author and his ability to write code. The second seems to have a more useful UI in your situation, but I have no history with the website or author.

ProcessExplorer is another easy way to do it, simply open up ProcessExplorer, hit Ctrl+F, and then type the name of the file. ProcessExplorer will list all the programs using that file. If the WhoLockMe tool doesn't work for you, I'd recommend ProcessExplorer next, simply because it has so many other useful features.

share|improve this answer
I found it with ProcessExplorer. I just needed to type the few letters of path of my drive (which was for example "e:"). Thank You very much. :) – user712092 Jun 25 '11 at 20:26
ProcessExplorer (apparently in difference with NirSoft's one) allows you to find folders being used, for example by a file system changes notifier utility, just <kbd>CTRL</kbd>+<kbd>F</kbd> and then type the letter of your thumb drive e.g. I: – Jaime Hablutzel Mar 8 '14 at 6:56
You need to run ProcessExlorer as Administator, if you want to search all processes, including system processes. – Alex Che Sep 9 '14 at 19:23
ProcessExplorer only works if the file is an executable: DLL or EXE. – Kaz Jul 6 at 5:40

I use EjectUSB (working download link):

EjectUSB could be considered the nuclear option of USB drives that just won't properly eject in Windows, because there's an "application or process" accessing it. Put EjectUSB on your thumb drive and run it, and the program will mercilessly kill every program, process, or anything else touching your drive, letting you safely remove it without any fear of data loss.

share|improve this answer
"the program will mercilessly kill every program, process, or anything else touching your drive, letting you safely remove it without any fear of data loss" The emphasized parts could mean a contradiction... – Sk8erPeter Aug 31 '14 at 17:25

In Windows 7 Pro, this works:

  1. Open "My Computer"
  2. Find the USB drive in question
  3. Right click on the USB drive
  4. Click on "eject"; you will now get the " use..." message - note that it has a "Continue" button!
  5. Click "Continue" to force the un-mount and you should be all set.

As per a prior answer, it's probably a good idea to make sure that the USB stick is set to be optimized for quick removal. That SHOULD ensure no open writes.... ymmv

share|improve this answer
No such context menu command in Windows 7: no Eject. – Kaz Jul 6 at 5:41

@Darth Android's solution also works with Process Hacker

  1. Ctrl+F
  2. Enter Drive letter, eg. E:
  3. Bam! A list of programs invading your device
share|improve this answer
Please read How do I recommend software for some tips as to how you should go about recommending software. – DavidPostill Aug 6 '15 at 21:29
Process Explorer is useful for this too. Thanks – Metafaniel Sep 23 '15 at 17:00
Doesn't work. Search for M: comes up with nothing, just like in Process Explorer. This appears to be a freeware clone of Process Explorer. – Kaz Jul 6 at 5:46

ProcMon by Sysinternals would allow you to watch all file and registry activity and allows you to filter only those entries referencing your thumbdrive. This may be a more thorough way to telling each and every process that is using your drive.

Also, depending on your Windows version, there may be default apps using the drive.

If Win7, check if SuperFetch is enabled on your USB thumb drives. If XP, check if disk write caching is enabled.

SuperFetch allows windows to use temporary storage as additional "RAM", moving the disk cache off the system drive. Disk write caching allows file transfers to and from removable disks to appear to go faster by actually occuring in the background and during system idle times.

share|improve this answer

I believe this is connected with Windows Indexing. See the following link:

How do I keep Windows 7 System from touching my USB flash drives when I use them?

share|improve this answer

I see this randomly on NTFS-formatted external drives (both HD and Flash). Even when they are set to "Optimize for Quick Removal" in Device Manager, something in the system (probably the filesystem driver) is holding onto something that it shouldn't. No tool I've found is able to even display what resource is being held, and Process Explorer doesn't show any open handles to the device or any of its files.

The only recourse I've found is either shutting down the system or using Sysinternal's sync tool to flush all the filesystem buffers and just yank the cord. When I do a "dirty" pull, I'll immediately reattach, run chkdsk, and be able to eject the drive normally afterwards.

share|improve this answer

After trying many tools i settled for Unlocker which helps in the scenarios where Windows complains about locked files etc. You can get it at While nirsoft utility and Process Explorer work, i think they are meant for advanced users. For a quick get out if the way solution Unlocker works.

share|improve this answer
using unlocker for a removable is not advised as you might corrupt the FS and the data inside it. – Lorenzo Von Matterhorn Dec 5 '13 at 0:29
@LorenzoVonMatterhorn: why would it corrupt the filesystem and the data inside it? – Sk8erPeter Aug 28 '14 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .