Have Windows re-detect all installed hardware?

BigToque

Lifer
Oct 10, 1999
11,700
0
76
I'm using Windows 8, but I assume the question would likely apply to all versions of Windows.

I was having some trouble with Windows not shutting down correctly, and constantly freezing for 5-10 seconds every now and then. I lived with it for a while and just happened to check Device Manager when a friend was having some trouble with their USB flash drive. When I enabled "Show Hidden Devices", I saw quite a few "devices" that weren't connected to the computer like old flash drives, and even things that seemed to point to network drives that were no longer connected to my computer. I guess this was probably what was wrong with my system, because after removing everything that wasn't attached to my system anymore, my computer seems to be working perfectly (it's only been half a day - so hopefully I don't jinx anything by posting this :p)

Anyway, I'm just curious if there's any way to "delete" all of the devices shown in Device Manager, and then when Windows boots the next time it will install drivers only for things that are currently physically installed.

I remember reading about something similar before as something you would do if you were migrating a Windows install to a whole new computer, but I don't recall if it was something reasonably easy to do, nor do I remember how you were supposed to do it.
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
Create a batch file by copy/paste these two lines into Notepad:

set DEVMGR_SHOW_NONPRESENT_DEVICES=1
devmgmt.msc


Save the file to your desktop as setdev.bat (NOT setdev.txt). When you double-click setdev.bat the developer version of Device Manager will open. Click View and select "Show hidden devices". When you expand each device category you'll now be able to see all the "super hidden" devices that are no longer installed (these aren't visible in the standard Device Manager even when show hidden devices is selected). All nonpresent device icons will appear "ghosted", and they can all be uninstalled.


.
 
Last edited:

Feradtw

Banned
Mar 28, 2013
4
0
0
www.rpprototype.com
Most of the time your Hard Drive Have lots of Bed Sector that is the reason Deteded. One a time. i was installing window In the end PC Detecded Window. I try to Again.