Cristiano said:
When I use the tray icon to remove the external USB hd, the hd is
correctly removed, but XP SP3 still sees the hd and I have no access to
the hd (I need to reboot the OS).
In device manager I see: "Windows cannot use this hardware device
because it has been prepared for "safe removal", but it has not been
removed from the computer. (Code 47)".
I tried to uninstall the driver, but it doesn't work.
How to fix the problem?
There is no "remove" action in the Safely Remove Hardware wizard. There
is a "Stop" action. You stop the device and then later can decide if
and when you want to physically remove it.
http://fixexe.com/pictures/safely-remove-hardware.png
The device may not be physically detected later until you physically
unplug and replug the device. Leaving it in the USB port after stopping
it may not permit you to simply restart the device. You unplug the
device and then later replug it to redetect it. I've heard but not
tested that some 3rd party software overcomes that limitation so you can
stop the device, leave it plugged in, and restart it later while still
plugged in; e.g., USB Safely Remove (
http://safelyremove.com/, $20) and
Zentimo Storage Manager (
http://zentimo.com/, $20). Another trick I've
been told about is to use Device Manager to disable the USB hub on which
the still-plugged-in device is connected and then reenable the USB hub
to force redetection of the still-connected devices on it (although you
might have to reenable those still-connected devices after reenabling
their USB hub). Of course, disabling the USB hub means all devices
still connected to it are also going to be affected.
After you unplug a USB device, it may not necessarily disappear from
Windows Explorer until you refresh Windows Explorer. You didn't mention
if you had Windows Explorer loaded at the time you stopped AND unplugged
the device. You didn't mention if you closed the still-open Windows
Explorer to reload it and have it scan for devices again. Close Windows
Explorer, stop the device, unplug the device, and then load Windows
Explorer.
After stopping the device and after physically removing it, can you plug
it in again to get it redetected and usable?
After stopping the device and after physically removing it from the USB
port, have you tried plugging the USB device into a different USB port?
Has this USB device been plugged into every available USB port in the
past? If so and the device is not detected upon reinsertion then it
could be an enumeration (registry) problem. If that's the problem then
registry editing to delete the old ENUM entries can force redetection of
the device but using Nirsoft's USBDevView is probably safer; however, if
enumeration is the problem then usually even after a reboot the ENUM
data is still going to be the same as before and still cause detection
problems (and you noted that a reboot got the device detected okay).
Note that some USB devices are poorly designed. They don't properly
transmit their presentation data on initiation (the USB handshaking)
when plugged in but previously powered up and used before. That is,
they were powered up, used before, stopped (and unplugged) but left
powered up, and upon initiation (plugging in) they don't present
presentation data the OS can understand. I've had that problem with
some MagicJack USB dongles where Nirsoft's USBDevView or Microsoft's USB
Device View show the OS couldn't understand the device's presentation
data (what it sends to the OS to identify its device type). The device
requires a reset on its hardware. Alas, few USB devices comes with a
reset and instead rely on a power cycle (power off, power on) on
themself or on their interface to do a reset.
Presumablly when you use the Stop action (there's no Remove action) in
the Safely Remove wizard, and because you're asking about a device that
has buffers (cache), they should get flushed before the device is
actually in stopped status and BEFORE it get physically removed. I've
read where other users had slow or stubborn USB hard disks (more likely
a poor USB interface in the external case rather than with the drive
itself) after trying to stop them so they used SysInternal's 'sync'
utility to flush the hard disk's cache (force an immediate write from
cache to platters). 'sync' has both flush and eject functions, so you
could stop the device using the Safely Remove wizard, use 'sync' to
flush the drive's cache, and use 'sync' to eject the device (change its
logical connection status) or use Windows Explorer for that.
SysInternals 'sync'
http://technet.microsoft.com/en-us/sysinternals/bb897438.aspx
Even if you stop a device, processes may still be loaded that have open
file handles on files on that device which can prevent flushing.
Zentimo and USB Safely Remove have a Forced Stop function to unload any
apps launched from the drive or unlock the inuse files. SysInternals'
'sync' (freeware) might also work for that but I haven't tested it since
I always close any apps ran from the device or close those files since
I'm obviously trying to yank away the storage device for them.
See
http://safelyremove.com/fullFeaturesList.htm in the "Stopping via
disabling". This is were stopping the device in the Safely Remove
wizard doesn't really stop the device (the driver for the device doesn't
perform the requested action) and instead you have to disable the device
in Device Manager. Because the device gets disabled to properly "stop"
it, replugging it in won't get it automatically enabled (so it goes
through its handshaking to transmit its presentation data to identify it
to the OS) - unless you use 3rd party software to automatically reenable
the device upon reconnection.
USB has been somewhat a crappy interface specification not so much due
to its definition (after v2.1) but mostly due to poor implementation in
the hardware. You might find better management of USB devices by using
the 3rd party programs. While SysInternals has freeware, they don't
provide all the functionality of the payware tools. At one time,
Zentimo was more expensive than USB Safely Remove. It had a few more
features but not critical so I used to recommend USB Safely Remove as a
3rd party solution; however, Zentimo lowered their pricing so it's the
same as USB Safely Remove. Here's a comparison between those two
products:
http://zentimo.com/zentimovsusbsr.htm