Aug
4
Safely Remove Brainstem
Filed Under Stupid, Vista, Windows 2000, XP
Here I sit, for 20 minutes, with a drive connected via USB that contains sensitive data. Despite my best efforts, I am unable to "Safely Remove Hardware". It's not so much that there's probably a file handle locked that I can't possibly unlock (without writing my own software to do it) but that any time you remove a drive like this without properly dismounting it first, you are in for a stern talking-to. Windows gets angry with you if you just rip out the USB cable. Windows berates you for it. It's possible that forcing a drive dismounted could cause it to lose data (and I've seen it happen). This is still not the worst part. When I attempt to dismount the drive properly, Windows only says:
The device 'Generic volume' cannot be stopped right now. Try stopping the device again later.
Later? How soon is that? What kind of shit is this? "Try again later"? Why is Windows being so general and non-specific? Is Windows going to tell me when it's done using my drive so I can finally dismount it as it has yelled at me before to do?
No.
So here I sit, clicking safely remove over and over again, hoping Windows will finally finish doing what it is doing. Nope, it won't dismount. Now I *have* to rip the cord out (or restart the computer) if I want to get my work done. Special thanks to Windows for being a hypocritical asshole. I'm glad file locks get hung up so often, because I really hate it when I want to delete an empty folder and Windows actually lets me delete it.
// 08-09-05 (mm-dd-yy) —--
I forgot to mention: I usually use ForceDel.exe to unlock files and folders (it's a champ - just drag a file onto the .exe and presto, it's unlocked — unless it really *is* in use). It happens so frequently at work that ForceDel.exe is sitting right on my desktop, ready to have things dropped on it. (I'm lazy).
Edit (10-11-07): this is exactly as annoying in Vista as it is in XP and 2000. Ugh.
Tags: mass storage devices, Operating systems, Safely Remove Hardware, USBComments
71 Responses to “Safely Remove Brainstem”
Leave a Reply

I know you could write your own program to unlock files, but have you ever come across this one.
Unlocker
http://ccollomb.free.fr/unlocker/
Next time, I may just try that, just so I can see if it really is a stuck file handle. With my luck, it's probably not. Anyone have any MSDN-ninja leet knowledge about this issue?
Have you tried
"Net use O: /delete" ? (where obviously O: is the letter of your drive)
I've never tried it myself but I was told this should unmount a volume (enabling you to unplug your USB device). Don't take a chance with your sensitive data, empty/duplicate the target drive first!
BTW if you have .AVI files on that drive there is a known problem with XP that litteraly dies trying to make a preview but fails and locks the file permanently. There is a registry patch to fix this (but I'd have to search so ask and ye shall recieve ;))
celeri: Thanks for signing up and participating! ^_^
I made a backup before ripping the USB drive out in fury, yes. I had moved a .RAR file to the drive, replacing the existing .RAR. Windows decided that it would let me remove it "later", which turned out to mean never. I just like to rant about things I cannot control. ;)
Unfortunately,
net usedoes not work on locally mounted filesysetms.Here's how you disable XP's annoying automatic preview:
regsvr32 /u /s shmedia.dllYou can enable it again by taking out the '/u'. This has no other side-effects.
I searched online for "safely remove hardware" and "usb drive" and your page came up. This page also came up, which you may find interesting. I have not had any issues when yanking my USB drive straight out of the port, and I would think that after 20 mins I would just get tired and do it, otherwise I would shut down the PC with the drive still inside.
I was exaggerating about the 20 minutes part, however it is true that if I had waited 20 minutes, it still would have been handle-locked. It is still entirely possible to lose data to locked file handles, though.
Instead of ripping out the cord, I restarted the computer, because I'm not about to take that 1 in 1000 chance.
I'm not exaggerating about waiting 12 HOURS for Windows to decide I can safely remove my drive. I'm talking about an external hard disk rather than a memory stick. I really, really, really, don't want to get corruption on my backup drive.
My initial reaction was to pan the "net use" comment as well. I know what it is, I know what it does, and it shouldn't make a difference. But I tried it, got the predictable "The network connection could not be found." error, but, oddly enough, I was able to dismount the disk after that. Not in the previous 12 hours, but I could after that.
It could be a coincidence. Or it might not. As we've seen, what Windows says is not always what it means.
I have been having this problem as well. No matter how long I wait, what applications I shut down (all), etc., XP will not let me dismount an external HDD. However, I just tried the NET command, after this site suggested it. Actually, I used
>umount G:
as I have Microsoft Services For Unix 3.5 on this machine, and I remember that syntax. XP replied with:
Drive G: is not an NFS mounted drive
But this must have cleared something up, because I was then allowed to 'Safely remove hardware' of this drive by using the systray icon.
Thanx for the suggestion -
Joe
I have the same problem, how do i dissconect my hard drive? Please do not get to technical on me, I have lost data off my external hard drive and all of the data was lost twice before because i just turn the external hard drive off with the power switch because that is the only way i can turn it off. HELP!
Easy!,
use a program called "Process Explorer" from sysinternals. This software can locate what handle is locking your external drive. The software mentioned earlier, "unlocker" can only be used on a particular file and not a drive.
Hope this helps.
Unlocker can be used on a drive! :D
Double click my computer. Right click the drive you want to disconnect. Select Unlocker and voila.
If you use Process Explorer and then just check that no files are open on your external drive then you can safely rip it out. If there are files open then try and manually close them or use a drive unlocker. This is what works for me.
Unlocker is the greatest software ever. It saved my mp3 player.
I'm now an unlocker fan too! Thanks to everyone who mentioned it here!
I had the same issue with my SimpleTech portable drive, but not consistently. I used to just shut down the computer and unplug it. Tonight, out of sheer frustration, I clicked on properties of the external drive and clicked on a link called "policies." Under policies, there were two options. Option one (which was selected) stated something to the effect of disable cache writing in Windows and the drive so that you can simply unplug it without having to go through "safely remove hardware." Option two (not selected) was to enable cache writing so that "safely remove hardware" option had to be used. So, tonight I simply unplugged the drive, got the little "bloop" sound, and no warnings or anything popped up stating that was a "bad thing" to do. You may want to check the policies of your external drive.
Thanks sooo much to all of you for mentioning unlocker! It's so frustrating to get the "device generic volume cannot be stopped right now" message over and over and not be able to do anything about it. I will be using the unlocker to remedy this annoyance from now on.
Unlocker really works. I'd tried all the other suggestions and still could not safely remove my USB drive. Then I downloaded Unlocker and Voila! Thanks to Unlocker Fan who gave the hint on how to use it.
Strange, my computer still refuses to eject my usb sticks and my usb hard drives.
Now idea, what could help. :-(
Unlockjer says, that my drive is not locked and the file monitor doesn't see any acces.
(Though it doesn't even see an access when I click on a file of my usb drive)
I use Antivirus Guard. Not sure if thos could be the culprit as the problem shows up even when it is disabled.
I'm getting really desperate
I struggled with this too. what I find now is that if the 'safely remove hardware' crap doesnt work on the first attempt, Ill rightclick the usb device and select 'eject'. I cant remember if this is a thirdparty addon or part of windows but it works every time.
Im facing the same problem here but this time it's a pcmcia TV-Tuner by Avermedia every time I tried to safe remove it i get the message "The device AverMedia E506 cannot be stopped because a program is still accessing it.And yes,I've killed every single task that could be using the tuner!
Still, nothing works for me, not this unlocker thing, nothing.
Ive read everyones posts but I have a somewhat sifferent problem. Im connected via Firewire not USB to my IOGear external 300GB HD.
At work the "safely remove hardware" works for all our drives there but at home on my XP HOME EDITION I cant get the damn drve shut down safely.
If I hit the power switch on the back of the IO Gear my entire system crash reboots - NOT GOOD!!
Ive went into properties and thought about messing with them but chose not to.
IOGEAR customer service only replied with "you should be able to simply turn the IO off with XP without having this issue". - SOME HELP EH???? LOL
So Im still stuck. Everyone seems to like this "unlocker" so I printed these pages out at work to take home.
If someone can explain step by step on how to get unlocker and then use it to a simpleton pc guy like myself, Ill be your biggest fan. :)
Rob the frustrated.
I find I can safely remove hardware if I first shut down Google Desktop & Disk Image Server [IOLA Search & Recover] using their notification icons.
I tried using the unlocker tool to no avail, however, it showed me that my Norton had some handles on some files in my external HD. I went into Norton Utilities options and changed the options so that the unErase wizard ignored my external drive. I was able to "safely remove" after that. So if you have Norton or some other similar program you may want to check into that.
Thank you very much Rodney. I had this happen before but could not remember much except that is was a Norton problem. Worked great again
Hello,
I have also this problem on Windows 2003 server.
What usually resolves it:
1) Logon to the server
2) Computer Management
3) Goto "Shares"
4) Right-click the administrative share for the drive and choose "Stop sharing"
5) After the share is stopped try to "safely remove hardware"
If the above doesn't work try the tips provided by "PsyDoc":
1) My computer
2) Rightclick the drive --> Properties
3) Goto "Hardware"-tab
4) Mark the USB drive, choose properties
5) Click the "Policies"-tab
6) Change to "Optimize for quick removal"
7) OK
Try to remove again
In my case the culprit was AVG virus program. Killed that and the USB drive released.
of all the solutions unlocker ( http://ccollomb.free.fr/unlocker/ ) is the best
True UNLOCKER has saved my files and flash drives innumerable times. A wonderful slim program.
I also had the b****y "cannot remove device right now" message for a 2nd hard drive in the CD/DVD slot on my laptiop. Used ProcessExplorer and found the culprit to be MusicMatch's mim.exe. As soon as I killed the process, I could remove the drive. Thanks MusicMatch!! You were supposed to be the user's friend!!
Just ran Unlocker and it saved my USB drive! As it turns out, I deleted a file on the drive, but Windows just moved it to the Recycling Bin. Of course, I wasn't aware of any of this until Unlocker told me so. Thanks guys for recommending Unlocker!
THANK you, CaPMan. The unlocker is wonderful and saved my files!
I closed the explorer that was blocking my HD from safely ejecting. I couldnt eject it immediately, but after i closed the unlocker (or maybe because it finally was 'later') it ejected.
Simon
You beauty! Musicmatch mim.exe was the culprit causing the generic volume shut down problem. A MILLION THANKS!!
This problem reminds me of a bug in Windows XP.
When you wanted to delete files, have you ever gotten the following error message (or similar):
Cannot delete x: The file is in use by another person or program.
——————————————————————————————
That error message can occur even when an application isn't using the file!
If you have that problem, that error message will repeat until you reboot!
This is a Windows bug. Windows sometimes refuses to let you delete a file until you reboot.
It's more likely to occur with Windows XP than with Windows 2000.
This includes temporary files.
Windows will refuse to let you delete temporary files until you reboot.
When a file's handle is locked, you're not allowed to eject the device. This is because this could cause filesystem damage on that device, or the loss of that file. If a program doesn't properly free its handle, then it will remain locked forever (unless you use a program which closes locks like the aforementioned Unlocker, or reboot your computer). File handles and other types of locks do not remain after a reboot.
Since Windows XP's Explorer contains features for scanning the metadata of media filetypes, files are going to be locked while thumbnails are created or metadata is gathered. If the file is screwed up or if Explorer (specifically shmedia.dll and/or shimgvw.dll) does not understand how to parse the data, the file handle can become lost. This is the only scenario in which it would be Windows XP's fault (and it's pretty easy to disable both of those DLLs via unregistration). There's a whole slew of third party shell extensions which could cause file handle problems as well... there are several listed here: http://wiki.DjLizard.net/DLL_unregistration
Since Windows 2000 doesn't have as much support for file metadata as Windows XP does, yes, it might happen less in Windows 2000. But I know your statement was a blanket one, probably heard from a guy who heard it from a guy :)
Most statements about how buggy Windows is are usually pretty unfounded, if not purely lacking in background information.
I don't have issues with Explorer's file handles, because I unregistered shmedia.dll (and I don't have any file-extension handling shell extensions whatsoever).
The only "temporary" files I know of that can't be deleted are ones with invalid names (such as a space as the last character) or index.dat itself (which can be unlocked with Unlocker or scheduled for deletion by CCleaner).
Unlocker works!!!
Thank god for this site and the "unlocker" program-finally got my external hard drive loose from Windows! Thanks so much!
This damn un-locker thing wont do anything for my usb hard drive even when I go to My Comp and right click on my hard drive to unlock. I says nothing is locked but it can delete, move, or rename the drive for me. Still I cant remove my hard drive. I do have the properties set for quick removal but I am not going to trust only that with over 10 gigabytes of my personal photographs.
Killing my McAffee virus allowed me to shutdown my external fire-wire drive.
I just figured a way to do this that I thought I would share...use at your own risk!
HOW TO SAFELY REMOVE A STUBBORN USB DRIVE:
1) CTRL+ALT+DEL to bring up task manager
2) Find 'explorer.exe', highlight it, click 'End Process', then 'Yes'
3) Still in task manager, click 'File > New Task (Run...)'
4) Type 'explorer.exe' in the box, the click 'OK'
Explorer should have released its grip on your data and let you remove the drive in the usual way
Well sure, that's the destructive way... the safer way is to allow Unlocker (mentioned above) to simply close the file handles Explorer had open (without killing Explorer).
I'm an unlocker fan now too...the program unmounted my usb drive which kept giving me the try again later crap.
I have found that Diskeeper 2007 was my problem. I would try to eject my flash drive using the U3 launchpad and the Safely Remove Hardware. Neither would work, even if I told Diskeeper not to mess with that device. However, when I went to Services and stopped the Diskeeper service, everything started working.
Bottom line: check to see if any service such as Diskeeper, av, etc. might be accessing, locking, or servicing that drive temporarily or persistently. Try to configure that service so that it will let go of the drive. Make sure you are running the latest versions of those programs. If this doesn't fix it, call the vendor and see if this is a known issue.
I'm having the same problem as everyone else
The device 'Generic volume' cannot be stopped right now. Try stopping the device again later.
BUT
I have tried using unblocker, setting the 'optimise for quick removal' option, I have also closed all applications (inc virus checker, gefragger etc), and I have also tried right clicking on the drive in explorer and clicking eject but still nothing.
In desperation i even tried killing the explorer.exe process and restarting it but i still cant seem to 'safely' remove the drive.
Please help.
Until you find out what program is holding the handle, you'll just have to shut down (or restart) the computer to safely remove it, or just take a chance and unplug it. I'll be putting up a wiki article soon detailing programs that hold handles and how to stop them from doing so.
edit: Oh yeah, you could also try just logging off your user account and then logging back in.
I have the same problem, instead of the USB, its my 5-in-1 card reader with my MemoryStickPro.
I have tried basically everything suggested above and still not going anywhere:
1/. Unlocker - didn't find any handle
2/. End all process
3/. Kill explorer
4/. Disable XP automatic preview
5/. Net use command
6/. Diable cache writing policy
I know it's sort of safe to remove the card when it's not accessing by XP, but please let me know if you have a better solution.
Thx
I have a new laptop. and in the bottom corner near the time i have the small icon for safely remove hardware. if i click it , the windod appears and it says that my DVD/CD rom drive is the one that can be safely removed. i'm a bit annoyed by this problem because i can't get rid of it.
What brand and model of laptop is it?
To disconnect 'busy' external USB HDD and delete folders that are locked by Windows, I was successful by doing a shutdown and restart of explore.exe in TaskManager. Now I use a freeware tool from Nir Sofer called Explorestart http://www.nirsoft.net/utils/restart_explorer.html. It's a simple utility that restarts Windows Explorer and Internet Explorer. All instances of Windows Explorer (explorer.exe) and Internet Explorer (iexplore.exe) are terminated instantly, and a new instance of Explorer is created after a few seconds. After which I can successfully delete locked folders and windows lets me disconnect external HDDs.
It happened to be a couple of times too. My solution: Press Ctrl-Alt-Del to fire up Tast Manager. Locate explorer.exe on the process list. Terminate the process, then fire up another explorer.exe. This time round, the usb is willing to unmount.
Food for thought--
I use two USB jump drives. One uses PortableApps Suite and the other uses PStart. Both allow me to launch portable apps for the low low price of nothing. You can check them out at portableapps dot com.
I noticed with PStart, even though I exited the program, Task Manager listed pstart.exe as a running process. After killing it, I was able to eject the device. PortableApps Suite did not show the same behavior, however after editing an Open Office document and closing the document and Open Office Portable and exiting PortableApps Suite, Task Manager listed soffice.exe as a running proccess. After killing that, I was able to eject the device.
There's a small bug in the URL that AussiePaul posted on 21 February: the link includes a final period (a.k.a. "full stop") after "html", resulting in a 404 error. If you simply use that URL, but one character shorter, it works.
This happens to me all the time. Then suddenly it says "you can now safely remove hardware" or words to that effect. This might happen after 20 times of not working.
This problem left me quite worried. After scanning through the Processes under Task Manager, there was no indication that the files of my portable hard disk were in used. Since my computer has two accounts, i simply logged off and logged in again. It was only then that Windows allowed me to remove the hardware safetly.
I had same problem with a USB pen drive and Unlocker did not cure it, but after right-clicking on the drive and choosing eject, I found I could stop it OK.
Wow. Good tip. I downloaded and installed UnLocker and it worked a treat. I didn't actually use it to unlock the drive, but when I right clicked the drive icon and chose UnLock, it opened a dialog and showed me that OpenOfficeOrg2.1 was holding files for quick opening. So I closed the OpenOffice SysTray application and then was able to Safely Remove my drive. :D
I figured it was safer doing that than terminating applications with the big red button.
Yup...unlocker ROCKS!!!...A bud of mine accidently damaged the firmware on my usb drive when he just pulled it out. all my data was in that 40gb drive. imagine the time and works to rebuild the data.
Anyway after buying a new Seagate 80gb, that message pops up and really got me worried. thanks to CaPMAN...and others mentioned about unlocker. Now i am not a worried dud anymore. thanks again.
Hey, process explorer from sysinternals worked great. You can search for a handle ("find" menu). I just usde the drive letter followed by a colon as the search sting (f:), and it showed me the open handle. If you choose "show lower pane" in the view menu, and select "handles" (as opposed to dlls) for the "lower pane view", you can just right click on the offending handle and choose "close". Although exiting the program that the handle is in would surely be the better thning to do.
I also am plagued by: "The device 'generic volume' cannt be stopped..." message. I believe it because of extra partitions in a drive.
I have a 500g WD My Book external hardrive & it is partitioned into two parts. I recently installed Unlocker, but it will not recognize the drive, because of the two partitions. Is there a way to be able to show the 500 on my desktop so that it can be recognized as a single drive ?
Why was my post removed ??
BEST OPTION UNLOCKER!!!
another vote for unlocker!
another issues with the remove hardware feature in windows xp and amazingly vista! is it does not show what each drive is called. if you have a few mass storage devices connected it does not display the name of each drive, only the drive letter, which is useless. also i have a habit of ejecting things which i didn't want to like my wireless usb device.
it's crazy normally i have to restart my computer just to eject a hard drive, also noticed that windows media player 11 is normally the cause, always happens when playing back video clips. time to reboot!
After reading the previous posts I think that there are different and distinct problems. I am using both XP-Pro and Vista.
1. The 'Safely Remove' icon is for removing USB drives when you have set up your computer HD for 'Performance' with or without cache. You can check it out as follows: Right click on a HD partition in Explorer and in the window that opens click on the 'Hardware' tab (choose your computer HD from the list), click on 'Properties' and than on 'Policies'. You can now set it up for 'Quick Removal' or 'Performance'. The latter with or without cache.
2. If any program in either XP or Vista will not close down than it is easy to do so in Task Manager where you can just click on 'End Task' under the 'Programs tab'. Task Manager can be quickly bought up in XP with Ctrl+Alt+Delete or in Vista by right clicking on the task bar and choosing it from the menu.
Have been using computers since steam driven DOS days, but never managed to sort out the 'device volume cannot etc' so just whipped out USB and camera cables willy-nilly. However, have just fitted an external disk for photographs and didn't want to risk losing all that so decided it was time to explore the 'forum ' field. Apart from it being a whole new world of really helpful folk, I've solved my problem thanks to this site. I downloaded Process Manager but not being a 'geek' (I mean that in a nice way) it all went over my head. However, today I downloaded Unlocker and to my absolute disbelieving delight, it's worked. Incidentally, it was Explorer.exe that was the problem. So thank you, all you helpful fellows out there. This old lady is charmed and delighted with you all!
SOLVING IT ONCE AND FOR ALL! SAFELY removing the USB drives! (FOR USB HARD DRIVES, possibly flash drives as well)
I've tried everything. Kllling explorer.exe and using both the Unlocker and Process Viewer programs. Nothing worked. I disabled indexing and closed my virus program. Still did not work. Finally, I found a solution.
A REAL simple SOLUTION:
Disable Windows Recovery for your USB Hard Drive letter under My Computer -> View System information -> System Restore Tab. Turn off monitoring for your USB hard drive. Now try disabling the hard drive. Worked excellent for me and I had this problem on BOTH WINDOWS XP and VISTA on 3 different computers using these OS's.
This is using a USB Antec Enclosure with a fan I bought for $40 and inside it a 1terabyte (1,000 gigabyte) hard drive. A lot of sensitive data is in it and I am glad I can now safely remove the USB hard drive. Good luck!
I too had Norton Utilities installed, the Unerase Wizard of which is an excellent programm other than most of the suite. Sometimes, though, according to unlocker, it is the cause of the problem that windows refuses to let the user remove an external usb drive. The solution proposed that one should disable unerase wizard for external drives is not useful if these drives are to be protected by Unerase. — I have had success by going to services (unerase runs as a service) and temporarily stopping the unerase service. Then remove drive, then restart service. simple as that. Make sure through unlocker that it is only norton that causes the problem.
I had the same problem with an eSATA/USB external drive till I changed the drive's hardware properties to 'Optimise for Quick Removal' in all machines it is used on. This turned off drive caching. I also disable the Recycle Bin on external drives.
Hi guys, I had a similar problem and ripped my usb out once, ever since then I get an error message pop up when I start windows. It says 'Run Time error 52: Bad File Name or Number'.
The process is called 'RavDr.exe' and I'm sure it's got something to do with taking out the USB without stopping it.
Any ideas what the process 'RavDr.exe' does?
Any help would be much appreciated...
Hi there. Surfing on the web I found a software that was pretty usefull for your issue. It is called Autorun Virus Remover. Basically is an utility for Removable devices that can block autorun process on them. but also can perform an UNLOCK of the device without compromise data in it(something like linux unmount).
It is very easy to use. You can found it at autorun remover and unlocker tool review.
There is a free demo available. I hope this can help someone.
These are my 2 cents.
Thanks for the excellent information posted so far. Like others, filemon did not reveal anything reading from/writing to the USB drive. Also, unlocker did not detect any file or directory being locked. Using Process Explorer, find, find handle (CTRL+F) and typed the drive letter of the USB drive. It revealed EXPLORER as the culprit to the root of the drive. I killed that one handle, and viola, USB removal succeeded.
Hope this helps.