De-unplug USB device?

S

Stan Brown

Sometimes I use the little icon in the notification area to unplug a
USB drive and then immediately realize that there's one thing I had
forgotten to do. Obviously I can physically remove and reinsert the
plug to make Windows start talking to the device again.

But is there any way to have Windows start talking again to a device
that has been "unplugged" by the software but is still physically
attached to the computer?
 
A

Andy Burns

Stan said:
But is there any way to have Windows start talking again to a device
that has been "unplugged" by the software but is still physically
attached to the computer?
Device Manager, Scan for Hardware?

(I've not tried it)
 
C

charlie

Sometimes I use the little icon in the notification area to unplug a
USB drive and then immediately realize that there's one thing I had
forgotten to do. Obviously I can physically remove and reinsert the
plug to make Windows start talking to the device again.

But is there any way to have Windows start talking again to a device
that has been "unplugged" by the software but is still physically
attached to the computer?
If it's a USB device, a common and usually quick way is to unplug the
device, and plug it in again. It may be necessary to use a different USB
port, or even controller.

The exact details seem to be the result of multiple layers of software,
drivers, BIOS, the chip set, the hardware device, and so forth.
 
D

Dave \Crash\ Dummy

Andy said:
Device Manager, Scan for Hardware?
Doesn't work.

"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)"

"To fix this problem, unplug this device from your computer and then
plug it in again."
(I've not tried it)
I generally try things before offering them as solutions. The only think
I have found that works, other than unplugging and reinserting, is
rebooting. Logging off and back on doesn't do it.
 
A

Andy Burns

Dave said:
I generally try things before offering them as solutions.
Please notice

1) my question mark
2) My admission I hadn't tried it

The only USB device I had to hand to plug/unplug requires intervention
on the device itself before it will reconnect/disconnect, so I couldn't
do a more complete test.
 
J

J. P. Gilliver (John)

charlie said:
If it's a USB device, a common and usually quick way is to unplug the
device, and plug it in again. It may be necessary to use a different
USB port, or even controller.
[]
(Though not usually, IMO.)
 
J

john

Sometimes I use the little icon in the notification area to unplug a
USB drive and then immediately realize that there's one thing I had
forgotten to do. Obviously I can physically remove and reinsert the
plug to make Windows start talking to the device again.

But is there any way to have Windows start talking again to a device
that has been "unplugged" by the software but is still physically
attached to the computer?
Not free.

http://safelyremove.com/
 
W

Walt

Sometimes I use the little icon in the notification area to unplug a
USB drive and then immediately realize that there's one thing I had
forgotten to do. Obviously I can physically remove and reinsert the
plug to make Windows start talking to the device again.

But is there any way to have Windows start talking again to a device
that has been "unplugged" by the software but is still physically
attached to the computer?
Go to Device Manager
Select Disk Drives
Select the USB drive; Properties; Select Policies; Check Optimize for
quick removal; click OK
This eliminates the disconnect step. Just plug it in and unplug it
when you're finished.
This works with all my USB drives. Hope this helps.
 
D

Dave \Crash\ Dummy

Walt said:
Go to Device Manager Select Disk Drives Select the USB drive;
Properties; Select Policies; Check Optimize for quick removal; click
OK This eliminates the disconnect step. Just plug it in and unplug it
when you're finished. This works with all my USB drives. Hope this
helps.
That will not do what Stan wants. A USB device disabled for safe removal
still cannot be reenabled without breaking and remaking the connection.
 
B

Bob I

That will not do what Stan wants. A USB device disabled for safe removal
still cannot be reenabled without breaking and remaking the connection.
Or rebooting ;-)
 
S

Stan Brown

Device Manager, Scan for Hardware?

(I've not tried it)
It was a good though, but didn't work. I got "Device driver was not
successfully installed."
 
S

Stan Brown

If it's a USB device, a common and usually quick way is to unplug the
device, and plug it in again. It may be necessary to use a different USB
port, or even controller.
Well yes, of course that works. (Did you miss my sentence beginning
"obviously"?)

But my concern is that every time I unplug a device and plug it in
again is one more chance, however small of some momentary electrical
fault that zaps the contents of the device (or the USB port in the
computer). Also, temperamentally I like to do everything possible
from the keyboard.

I'm not going to lose sleep over this particular issue, but I figured
it couldn't hurt to ask.
 
S

Stan Brown

Please notice

1) my question mark
2) My admission I hadn't tried it
I don't have a problem with people suggesting untested solutions if
they disclose that they're untested, as you did. I can then decide
on my own whether it's worth testing.

What annoys me is people posting definitely "Do X", when they haven't
tried X and don't in fact know what they're talking about.
 
B

BillW50

In
john said:
Yes I use USB Safely Remove and Zentimo on all of my Windows machines.
They are both basically the same except Zentimo costs more and has a few
more features (which honestly I don't use the extra features anyway).

The only flaw of this method (from both products) is that it resets
*all* USB ports once again. So all USB ports goes dead for a second or
two. Which isn't good if data is flowing on another USB port. But I am
pretty sure it warns you if this is the case.

And USB Safely Remove was offered on the following dates for free:

August 8, 2011
January 12, 2012

And Zentimo was offered on:

November 3, 2010
December 12, 2011

At: www.giveawayoftheday.com (GAOTD). Both products are produced by
Crystal Rich Ltd. And if you check their website, they offer reduced
prices from time to time. Although one of the two will probably be
popping up on GAOTD in a month or two if you want to wait that long. I
purchased lifetime licenses for both myself. As I use them all of the
time, so it was well worth it. ;-)

http://zentimo.com/
 
G

Gene E. Bloch

Well yes, of course that works. (Did you miss my sentence beginning
"obviously"?)
But my concern is that every time I unplug a device and plug it in
again is one more chance, however small of some momentary electrical
fault that zaps the contents of the device (or the USB port in the
computer). Also, temperamentally I like to do everything possible
from the keyboard.
You could connect a wire from your tinfoil hat to the chassis of the
computer and not have to worry about static zaps.

You do have a tinfoil hat, don't you?
I'm not going to lose sleep over this particular issue, but I figured
it couldn't hurt to ask.
And also, please don't lose sleep over my feeble joke above :)

One thing that I have done with USB hard drives (not thumb drives,
IIRC) is to send them offline in Disk Management and later put them
online again, but I'm not sure that it really is safe to do, so I don't
try it any more. Any opinions?
 
V

VanguardLH

Stan said:
Sometimes I use the little icon in the notification area to unplug a
USB drive and then immediately realize that there's one thing I had
forgotten to do. Obviously I can physically remove and reinsert the
plug to make Windows start talking to the device again.

But is there any way to have Windows start talking again to a device
that has been "unplugged" by the software but is still physically
attached to the computer?
Nirsoft's USB Device View
http://www.nirsoft.net/utils/usb_devices_view.html


Freeware. It does more than just view. You can disconnect/connect,
enable/disable, and several other functions.
 
D

Dave \Crash\ Dummy

VanguardLH said:
Nirsoft's USB Device View
http://www.nirsoft.net/utils/usb_devices_view.html


Freeware. It does more than just view. You can disconnect/connect,
enable/disable, and several other functions.
How do you do it? I can't get it to won't work for the situation
described. I plugged in a 4 GB Flash drive and then used the Windows
"Safe removal" option. I then ran USBDevice as adminstrator, and
although the flash drive is listed, none of the actions offered
reconnect it. I repeated the actions with USBDevice running, with the
same result.
 
V

VanguardLH

Dave said:
How do you do it? I can't get it to won't work for the situation
described. I plugged in a 4 GB Flash drive and then used the Windows
"Safe removal" option. I then ran USBDevice as adminstrator, and
although the flash drive is listed, none of the actions offered
reconnect it. I repeated the actions with USBDevice running, with the
same result.
In USBDevView, what were the statuses listed for the device (after you
"safely removed" the USB device)? From the columns for that device,
what were the values for:

Connected?
Safe to Unplug?
Disabled?

Is the USB drive plugged into a USB port on the system case so it goes
to a USB controller on the motherboard? Or are you plugging it into a
USB hub?

Are you sure you are looking at the correct USB device listed in
USBdevView? USB devices record enumeration data in the registry when
plugged in. That data remains in the registry after you unplug the USB
device since it gets reused when you later re-plug the device back in.
So it's possible, for example, that you are looking at a USB drive that
you plugged in sometime earlier thinking it's the one you have plugged
in now. For example, I have 2 USB thumb drives: one from PNY and
another from FujiFilm. Both of them show up in USBdevView because their
enumeration data remains in the registry whether they are plugged in or
not. So I could be looking at the FujiFilm USB thumb drive which is
sitting in a drawer somewhere when it's the PNY that actually plugged
in.

Use the Description column to decipher the USB device. Hopefully there
is something differnt between all the USB thumb drives that you've
plugged into this host. If they are from the same brand and are the
same model, use the serial numbers to different them. Of course, you
won't know what is that value unless you plug just one of them into a
USB port and see which one has Connected=Yes status.

If you only have one USB thumb drive plugged in, it should have Device
Type = Mass Storage. While you might have multiple entries in the
registry for enumeration data on several USB thumb drives, you should
only see one listed as Connected = Yes (if you only have one plugged
in). For the Device Type = Mass Storage device whose Description (and
Serial Number) are for the *one* USB thumb drive that you have plugged
into a port so it shows Connected = Yes status, what does USBdevView
report for its Safe to Unplug state? Is Disabled = No (if Yes then you
cannot reach the device)? Is USB Hub = No?

I did a test. With my "PNY USB 2.0 FD USB Device" (Description) plugged
into a USB port to a mobo USB controller (Hub = No), it Connected state
was Yes. If it was no then I'd know there was something already wrong.
Safe To Unplug was No since it was still plugged in and I had not yet
stopped the device. Disabled = No since the device was active and
reachable. I then used the Safely Remove Hardware wizard and clicked
the Stop button. A prompt appeared saying what devices would get
stopped. It worked okay and the Safely Remove Hardware wizard went
blank (Hardware Devices list got emptied out since not were ready).
I had expected Safe To Unplug status in USBdevView to change from No to
Yes. Didn't happen. It was still Safe To Unplug = No. Could be it
doesn't apply to flash memory. What I did notice in USBdevView is
Connected went from Yes to No. So I right-clicked on the PNY device and
was expecting to find a Connect option. Nope, just Disconnected was
there. So I couldn't get the device to get reconnected while it was
still in the USB port after I had just removed it. Then I remembered
something ...

When you plug in a USB device, there's some handshaking with the device
to get its "presentation data". This identifies the device. Windows
won't know what type of device it is, its description or serial number,
or other parameters until that handshaking occurs. Well, it occurs when
you plug in the device. The device has to "present" itself. Sitting in
a USB port without initiating the presentation means the device isn't
even known to exist.

If you right-click on a USB drive in USBdevView and select Properties
from the context menu, you'll see what is included in the presentation
data during the handshaking. However, what you see here is what got
recorded in the registry from a prior presentation handshake. After
being unplugged, being in the USB port is no different than sitting on
your desk. It's the handshaking that's needed to present the device to
Windows so it know what type of device it is and what driver(s) to use.

You need to instigate the handshake phase to get the device's
presentation data to the OS so it knows how to interface with that
device. I'm probably not using the exact or accurate terms here. USB
designers probably have their own terminology.

http://www.pulsewan.com/data101/usb_basics.htm
http://wiki.osdev.org/Universal_Serial_Bus

They mention a Control transfer to configure (identify) the device. In
the 2nd article, section 6.4 talks about USB Device Enumeration. You
need a physical state change to initiate enumeration (definition of the
device).
 
D

Dave \Crash\ Dummy

VanguardLH said:
In USBDevView, what were the statuses listed for the device (after you
"safely removed" the USB device)? From the columns for that device,
what were the values for:

Connected?
Safe to Unplug?
Disabled?
No, Yes, No
Is the USB drive plugged into a USB port on the system case so it goes
to a USB controller on the motherboard? Or are you plugging it into a
USB hub?
Case (front).
Are you sure you are looking at the correct USB device listed in
USBdevView?
Yes

USB devices record enumeration data in the registry when
plugged in. That data remains in the registry after you unplug the USB
device since it gets reused when you later re-plug the device back in.
So it's possible, for example, that you are looking at a USB drive that
you plugged in sometime earlier thinking it's the one you have plugged
in now. For example, I have 2 USB thumb drives: one from PNY and
another from FujiFilm. Both of them show up in USBdevView because their
enumeration data remains in the registry whether they are plugged in or
not. So I could be looking at the FujiFilm USB thumb drive which is
sitting in a drawer somewhere when it's the PNY that actually plugged
in.

Use the Description column to decipher the USB device. Hopefully there
is something differnt between all the USB thumb drives that you've
plugged into this host. If they are from the same brand and are the
same model, use the serial numbers to different them. Of course, you
won't know what is that value unless you plug just one of them into a
USB port and see which one has Connected=Yes status.

If you only have one USB thumb drive plugged in, it should have Device
Type = Mass Storage. While you might have multiple entries in the
registry for enumeration data on several USB thumb drives, you should
only see one listed as Connected = Yes (if you only have one plugged
in). For the Device Type = Mass Storage device whose Description (and
Serial Number) are for the *one* USB thumb drive that you have plugged
into a port so it shows Connected = Yes status, what does USBdevView
report for its Safe to Unplug state? Is Disabled = No (if Yes then you
cannot reach the device)? Is USB Hub = No?

I did a test. With my "PNY USB 2.0 FD USB Device" (Description) plugged
into a USB port to a mobo USB controller (Hub = No), it Connected state
was Yes. If it was no then I'd know there was something already wrong.
Safe To Unplug was No since it was still plugged in and I had not yet
stopped the device. Disabled = No since the device was active and
reachable. I then used the Safely Remove Hardware wizard and clicked
the Stop button. A prompt appeared saying what devices would get
stopped. It worked okay and the Safely Remove Hardware wizard went
blank (Hardware Devices list got emptied out since not were ready).
I had expected Safe To Unplug status in USBdevView to change from No to
Yes. Didn't happen. It was still Safe To Unplug = No. Could be it
doesn't apply to flash memory. What I did notice in USBdevView is
Connected went from Yes to No. So I right-clicked on the PNY device and
was expecting to find a Connect option. Nope, just Disconnected was
there. So I couldn't get the device to get reconnected while it was
still in the USB port after I had just removed it. Then I remembered
something ...

When you plug in a USB device, there's some handshaking with the device
to get its "presentation data". This identifies the device. Windows
won't know what type of device it is, its description or serial number,
or other parameters until that handshaking occurs. Well, it occurs when
you plug in the device. The device has to "present" itself. Sitting in
a USB port without initiating the presentation means the device isn't
even known to exist.

If you right-click on a USB drive in USBdevView and select Properties
from the context menu, you'll see what is included in the presentation
data during the handshaking. However, what you see here is what got
recorded in the registry from a prior presentation handshake. After
being unplugged, being in the USB port is no different than sitting on
your desk. It's the handshaking that's needed to present the device to
Windows so it know what type of device it is and what driver(s) to use.

You need to instigate the handshake phase to get the device's
presentation data to the OS so it knows how to interface with that
device. I'm probably not using the exact or accurate terms here. USB
designers probably have their own terminology.
Okay, you lost me. Can you do this with USBDeview or not?
http://www.pulsewan.com/data101/usb_basics.htm
http://wiki.osdev.org/Universal_Serial_Bus

They mention a Control transfer to configure (identify) the device. In
the 2nd article, section 6.4 talks about USB Device Enumeration. You
need a physical state change to initiate enumeration (definition of the
device).
Four snapshots show details of my experience:
http://crash.thedatalist.com/temp/Images.htm

After that, I can only reconnect the flash drive by unplugging and
reinserting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top