Drive letter assignment/mounting in Winders

Sep 7, 2001
17,838
0
81
#1
I have several fixed disks, a few external HDDs, and several USB flash drives that I connect pro re nata. I always use 'safe removal' feature or shut down properly if the drives are connected 'internally' (mobo SATA ports). All local connections nothing on a domain or network.

Anyone else experience a problem where you connect/disconnect a lot of drives (whether removable storage or fixed disks) multiple times and Windows stops assigning letters on subsequent connects? i.e. you have to go into Disk Management and assign a drive letter 'manually'?

Also, there is a place in the registry where Windows 'stores' a list of previously plugged disks and volumes (fixed and removable) or prior drive letter assignments. I previously stumbled upon this key when looking for something else but can't remember where to find it. I'm wondering where this key is and whether it can be cleared out or reset? TIA!
 
Last edited:

Bubbaleone

Golden Member
Nov 20, 2011
1,803
0
76
#2
I'm a regular drive swapper as well and the (fairly painless) solution I've used for years for cleaning up old drive letter assignments is a simple little batch file that opens the developer version of Device Manager. Device Manager is simply a GUI registry editor.

In the developer version, when you select View > Show Hidden Devices and then expand any category, every nonpresent (no longer installed) device you've ever used on that PC will show up with a pale gray or "ghosted" icon beside it.

Each ghosted icon represents an item that is still contained in the registry, although not currently in use. Hence, the problem of the registry having multiple drive letter assignments for the same drive hardware IDs.

For the batch file, open notepad and enter these two lines:

set DEVMGR_SHOW_NONPRESENT_DEVICES=1
start devmgmt.msc

Then save to your desktop as "SetDev.bat" (not SetDev.txt).

You can safely delete every ghosted icon found under every expanded device category. Note; some screens make it a bit difficult to clearly differentiate between normal and ghosted icon colors so just take your time until you get familiar with it.

Edit: When you've got a large number of ghosted devices to uninstall, the quickest way is to simply highlight the device, hit delete, and then hit enter. Goes quick...

.
 
Last edited:
Sep 7, 2001
17,838
0
81
#3
Thanks I had forgotten about 'hidden devices' in Device Manager. BTW your .bat file command doesn't seem to work for Windows 7 SP1. It just brings up regular Device Manager. Then I have to click "View => show hidden device" manually.
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
0
76
#4
Yeah, I didn't think to mention that there's no obvious difference between the standard and developer version until you actually select 'show hidden devices'. Regularly cleaning up with the dev version is a completely safe means for keeping the registry tidy, and that'll keep poor old Windows from getting confused and going on strike after it's seen the same drives (or any other device) plugged and unplugged one to many times.

.
 
Last edited:
Sep 7, 2001
17,838
0
81
#5
Yeah, I didn't think to mention that there's no obvious difference between the standard and developer version until you actually select 'show hidden devices'.
Thought you might find this of interest:

GhostBuster utility (enumerating and deleting hidden/ghosted devices)
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
0
76
#7
Thought you might find this of interest:

GhostBuster utility (enumerating and deleting hidden/ghosted devices)
Nice tool! Looks like this should make uninstalling ghosted devices a hell of a lot quicker than having to 'highlight/delete/enter', one device at a time.

.
 
Jul 27, 2018
70
4
16
#8
I had a problem where none of my flash drive would install, had to reinstall Windows 10 from scratch to fix it
 


ASK THE COMMUNITY

TRENDING THREADS