Helping people with computers... one answer at a time.

Before you can remove a removable device, Windows needs to make sure no programs are still accessing it. If one or more are, you can't "safely remove".

I bought a new 1TB external hard drive the other day and installed it on my laptop right away, everything was working fine until I tried to safely remove it. Whenever I click safely remove it says "Windows cant stop your generic volume device because it is in use". I checked everything and I didn't have a single program running. I don't want to shut it off manually because I have hundreds of important files on it and I don't want to lose them. can you help?

Oh, just because you don't have a program running, doesn't mean that there aren't other programs running. Heck, that's all Windows itself is: a computer program.

What we have is a situation very much like How can I find out who is using a "file in use"? - except that we don't know the name of the file, or whatever else might be "in use".

I'll show you my technique, which looks very similar to the file in use scenario, as well as cover an easily overlooked common cause or two.

I'd guess the most common cause of an unexpected device in use is having Windows Explorer open and viewing the contents of the drive.

Windows Explorer viewing a removable drive

That's enough for the device to be considered "in use". The solution? Simply either close the Windows Explorer window, or select and view some other drive.

The same's true for the Windows Command prompt:

Windows Command Prompt viewing a removable drive

The problem is that the removable drive is the "current" drive in the Windows Command prompt. The solution is to close the window, or change the current drive.

"... this concept of a 'current' drive is actually common to all Windows programs ..."

Now, the problem gets more complex, because this concept of a "current" drive is actually common to all Windows programs, and is frequently handled differently by each. For example in some applications if you do a "File Open..." and open a file on your removable drive, the application will set the "current drive" to be that drive - and leave it that way even after you've subsequently closed the file. In fact, it may not change until you perform some other kind of open or save operation using a different drive.

Or, of course, you can close the application.

And yes, often the "application", for lack of a better term, is Windows itself, making it difficult to understand exactly what is still accessing the device, not to mention whether or not you can close it or change what it's accessing.

One approach is to break out one of my favorite diagnostic tools, Process Explorer.

Download process explorer, if you haven't already, and run it. Type CTRL+F (or hit the Find menu, Find Handle or DLL ... menu item), and type in the drive letter of the device, followed by a colon. In the examples above where my flash drive was the H: drive, I'd type in H:, and then click on Search.

Process Explorer Find operation on a drive letter

What you're seeing in this example are the two processes on my machine that have the device in use: the Windows Explorer and Windows Command prompt that I used for my examples above.

Now that you've identified which process has the device in use, you can take appropriate action: something in the program - like changing the current drive in a Windows Command prompt - or by closing the program itself, if that makes sense.

And finally, as mentioned in a related article on the topic, you might well find that the culprit is your anti-malware tool scanning the device, or the Windows indexing service, or other tools that might be accessing your drives.

Article C3890 - October 15, 2009 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

6 Comments
Vincent
October 15, 2009 4:34 PM

In my case it was almost always search indexer (on XP).
Since I've upgraded to Windows 7 a couple of weeks ago, I have never had any trouble ejecting anything.
So far so good :-)

Vincent S. Venturella
October 20, 2009 7:40 AM

In my case the icon doesn't disappear, but now when I click it and then click the volume to be stopped (such as my external Drive) I now never get a note saying it's safe to remove. The only thing that happens is the icon will move positions or blink. How do I get back the "safe to remove" notation?

Howie Marshall
October 20, 2009 1:37 PM

The original question mentioned a 1TB external drive with "hundreds of important files on it". To be perfectly safe in that situation, you can always Shutdown (not Hibernate, or Sleep, or Standby, or even Restart) Windows. Once the system powers off you can safely remove the external drive, since in the process of shutting down, Windows will terminate all processes, close all files, and post any buffered writes to all drives.

I encounter this problem nearly every time I connect a FLASH drive or USB hard drive to my Vista laptop. I have never been able to identify the offending process, but having read this article I will have Process Explorer at the ready the next time it happens. Oddly, this never seems to happen to camera memory cards when I insert them into the builtin card reader on that laptop, even though I cannot imagine how they are treated differently -- they look like just another external drive otherwise.

Yossi
December 29, 2009 5:52 PM

I had the same problem, and did what you suggested, worked perfectly.

Thank you

Vil
September 16, 2011 10:44 PM

Thanks for the tips, specially for the Process Explorer recommendation, finally I can liberate my external drive from the evil clutch of Windows.

.C.

Tariq
October 1, 2011 10:09 AM

This happens often for me, especially since I DON'T keep anything on my local drive, everything is on externals.
I simply "restart" my computer, allow it to go through it's startup routine, loading antivirus, then click "safely remove hardware" and it works.
Kind of a long way to do it, but gives me peace of mind that all my saved data will be SAFE.
I've corrupted a WD Passport external drive before by disconnecting prematurely so this is the ONLY method I use if what's on the drive is important to me.

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to http://askleo.com/ask to ask your question.