This device is currently in use – MichaelHinds.com

If you're dutifully trying to eject a USB disk and get the frustrating message "This device is currently in use. Close any programs or windows that might be using the device, and then try again." there's a way to find out the culprit.

Screen grab of problem ejecting usb mass storage device message
  1. Download Handle. This utility is part of Windows Sysinternals, and tells you what processes have what files open.
  2. Extract the executable to somewhere on your path, for example C:\Windows\system32
  3. Run a command prompt as administrator (in Vista and Windows 7, right click on a shortcut to cmd.exe and select "Run as administrator")
  4. At the command prompt, type "handle I:\" where I is the drive letter of the device

You should see output like this:

C:\>handle I:\

Handle v3.42
Copyright (C) 1997-2008 Mark Russinovich
Sysinternals - www.sysinternals.com

TextPad.exe        pid: 5136    550: I:\personal

C:\>

This tells you the application and the process ID. You can either close the application, or if you're happy you've saved everything and the process isn't a system one you can use the PID to kill it in task manager.