After I use the 'Safely Remove Hardware' notification area widget, how do I get Windows to re-attach a USB device (i.e. a USB drive) without having to unplug and plug it in again?
5 Answers
- Device Manager
- Universal Serial Bus controllers
- USB Mass Storage Device find one with yellow (!)
- Disable device, [Yes] to disable
- Enable device, [No] to restart
- Disable device second time :D [Yes] to disable, [No] to restart
- Enable device
Device reconnected.
- 301
- 2
- 3
-
Great. This also works with disks connected through eSATA ports. Additional note: you may have to ignore warnings about the need to restart the system – gog Sep 25 '20 at 06:46
-
Somehow this works, but why should we disable&enable *twice*? Also, is there any way to do this with command line? Anyways thanks for a great info! – starriet Jul 19 '22 at 23:16
Check the RescanDevices (ZIP file) tool at this Drive Tools for Windows page.
When an IDE or SATA drive has been prepared for safe removal it can be brought back by a scan for new hardware. That's what this tool initiates.
It is a non interactive, invisible Windows application. It does the same as Microsoft's tool DEVCON when called with parameter 'rescan'.
There are some other good notes and tools at that page.
-
3Gave this a go and it doesn't seem to do anything. I also downloaded the MS DEVCON tool and devcon rescan doesn't re-attach the drive. – Kev Aug 29 '09 at 16:11
-
I had a different problem: after a while, my windows 7 failed to see my external usb drive, which was still plugged in. The RescanDevices tool found it in a matter of seconds, but I wonder why did the problem occur in the first place. – Chiffa Oct 13 '13 at 20:02
-
1I have to report the same outcome as @Kev: On Windows10 neither `RescanDevices.exe` nor `devcon.exe -rescan` did do anything for me. – summerrain Apr 03 '23 at 22:51
It was answered it on Server Fault a while ago! My answer was -
If you use eject instead of safely remove, it unmaps the drive and kills all open handles (and displays the popup saying it is safe to remove), however the device is still present. You can then go to Device Manager and disable followed by enable the flash drive, and it should remap itself.
I can not guarantee, but I assume the same should work for safely remove - however if it does actually remove the device, you should be able to readd it by going to device manager, right clicking on the computer object and click scan for new hardware.
You can also try a utility called DEVCON.
- 12,090
- 23
- 70
- 90
- 116,650
- 19
- 182
- 266
-
1In Windows 10, detecting an ejected stick is a bit tricky, as there is no yellow exclamation mark on the **USB Mass Storage Device**. One thing to go on is the _location_ in Properties>General. Fine as long as it is not the one with the 30 digit address, but not if there is more than one stick connected, – Laurie Stearn Oct 06 '19 at 04:51
Try to go to Device Manager, disable the USB driver, wait a few seconds, and then enable it again.
Also check the article How Do I Force Windows to Remove and Re-detect a USB Device?.
- 12,090
- 23
- 70
- 90
- 660
- 2
- 8
- 18
Or just uninstall the USB device in Device Manager - the run 'Scan for hardware changes'.
- 12,090
- 23
- 70
- 90
- 491
- 1
- 3
- 11