If you’ve ever plugged a USB device into your computer, you’ve probably experienced the need to properly disable it. When you are done with the device, you are supposed to safely stop the device before you shut it down. This is to make sure nothing is accessing the device at the time of shutdown.
Let’s say you have an external hard-drive that you want to turn off. If you don’t properly stop it, Windows may be accessing some files at the time of shutdown, and this may cause data corruption. Sometimes when you try to shut it down though, you get an error saying the device is in use. This may happen even if you know nothing is using the device. All explorer windows are closed, and you know no programs are using it.
If this happens, you can use freeware Process Explorer to hunt down the thread accessing the device. Just open Process Explorer, hit
Ctrl + F to open the Search menu, and enter the drive, in my case, “E:\”.
Now I can see a hidden instance of explorer is actually accessing the E: drive, so I just need to click on the result to see the thread. Now, right-click the thread, and close the handle.
Now that the hidden instance of explorer is closed, we can go about stopping the device the right way and avoid possible data corruption.
In my experience, this happens often when I access an external drive a lot and keep opening and closing exlorer windows. Occasionally, an instance will be remain open even though I’ve closed all windows. This method is also good for other USB devices that may annoy you. Just search for the drive letter and close all handles accessing the drive.