"This Device Is Currently In Use"

Using any recent version of Windows, when you connect a removable drive, you get a little icon in the taskbar that you’re supposed to click when you want to disconnect the drive. You then click on “Eject xxxx” and you’re supposed to get a balloon saying it’s now safe to turn off the device.

More often than not, I get the message in the title, saying the device is in use. Occasionally, this is true — I forgot I left a document open or something. But often, it isn’t – it’s not possible for any documents to be open, or any writes to be in the cache, because on some of my drives, all the partitions are encrypted, and I’ve already demounted them, and the encryption software won’t let you demount them if they’re in use. And Windows can’t read or write anything from the dismounted, encrypted drives anyway.

Usually when this happens, I either just leave the damn thing running until I turn the PC off, or restart the PC.

But assuming I’m right about no files being open or unwritten, could anything bad happen if I just turned the removable drive off?

the only thing would be if any uncached writes weren’t commited to that drive. disconnecting the drive before that happens means whatever you were saving would be missing or corrupt.

but AFAIK cached writes are commited in a fairly short time.

You can download Process Explorer from Microsoft and find out who is grabbing onto what files on your external drive.

I found out that Office would latch onto the drive for no darn good reason even though I had never opened a single file on the drive with Office and Office had absolutely no business touching the drive. From then on, if I got the device currently in use error I would just go into the task manager and kill Office, and then I could remove the drive.

It probably isn’t Office in your case, but at least you can find out who the culprit is.

This usually happens because you previously used an Office module on one of the files on this removable drive. Microsoft has jiggered things to make Office appear to be faster, Like preloading parts of Office when the machine is started. And sometimes ‘accessing’ the last-used Office files from the device when it is inserted. If you then use Office on a file on this device, and close it, the file is released. But if you do something else, and never close Office, the system still sees those files as ‘in use’ by Office.

But just closing down Office normally should fix this, without needing to kill it via Task Manager.

A more permanent fix would be to turn off the option for Office to preload when your machine is booted.

Process Explorer looks great; thanks for the tip.

I don’t run Office (except for a portable version of LibreOffice which I only use occasionally) so that’s not it, but PE should tell me what’s going on. Thanks again.

If you have a Command Prompt window open, and the Current Directory is set pointing to some directory on the drive, even though no actual program is running in your Command Prompt window, then you get this message when you try to dismount or eject the drive.

It may be that other apps are doing the equivalent thing, possibly behind the scenes. I could imagine Office doing that.

I’d sooner bet it was either an antivirus scanner or a search indexer crawling files on the drive. In any case, PE will end all the speculation and then you’ll know what’s causing the hang-up.

Is it possible that it’s the encryption program itself which is still “using” the drive?

What devices are you connecting?

I’ve had this happen a few times, the most recent being today. I located the handles; there were 6, but they all belonged to “System”, so I didn’t feel safe deleting them. They all started with “H:$Extend$RmMetadata$TxfLog$TxfLog”.

I did notice that when I clicked on “eject” from the drive’s icon in the system tray, all the handles were killed, then the “drive in use” message showed up again. Then when I clicked on “OK”, the handles appeared again.

I did have indexing on the drive, so I turned it off.

Some searching suggested that the only completely safe thing to do is a normal shutdown. I did that, powered up and tried the drive again to see if turning off indexing solved the problem, but the same thing happened.

The next-to-last resort seems to be to use “fsutil volume dismount [DRIVE]”. You have to do that from an administrator-level command prompt, but I couldn’t get that to work.