Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

7 Answers 7

up vote 10 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
2  
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 Mar 8 at 6:56
    
You need to run ProcessExlorer as Administator, if you want to search all processes, including system processes. –  Alex Che Sep 9 at 19:23

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 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 "...in 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

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 http://www.filehippo.com/download_unlocker/. 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 at 17:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.