I've tried all sorts of things and been stumped…any suggestions welcome! I'm starting to contemplate reinstalling Windows now…
I have a drive in my computer that I might have added by mounting a VHD, but I can't seem to get rid of it now:
What I've tried so far (keeping a running list because these methods might work for others):
- Right clicking on the drive and clicking on Disconnect (it wasn't an option)
- In the command line: subst, net use (not a network drive)
- Looking in Disk Management (drive was not listed)
- In Explorer, going to Tools | Folder Options and on the View tab checking the "Hide empty drives in Computer folder" option. (source)
- In the registry under HKLM\SYSTEM\MountedDevices, removing the \DosDevices\L: key (source)
- In that same key, removing all the \??\Volume{…} keys
- Made hidden devices visible in Device Manager, then uninstalled disconnected Disk drives and Storage Volumes.
- Looking in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons (nothing there)
- Ran
mountvol.exe
andmountvol l: /D
in the command line (didn't list L:) - Collecting all references to L: in the registry (
reg query HKLM /s /f "L:" > "%userprofile%\Desktop\reg.txt"
). Found a reference to Motorola XT912, went into Device Manager, deleted it. Drive still there. - Tried USB Oblivion. Looks like it will ignore L:
Found drives (will be ignored): C: D: E: F: H: J: L:
- Ended up searching the registry again after all the above steps, and removing keys in the ControlSet in DosDevices.
Things that might be dangerous:
- Removing all the hidden Storage volumes (including the ones that exist), as well as all USB mass storage devices that were disconnected (didn't work either)
Other things I looked at:
- In Safe Mode, the L: drive doesn't show up.
- In clean boot, it does.
- I don't have Windows Office Click-to-Run.
Ideas welcome!
Best Answer
Analysis
The first thing you will notice is that the drive appears in the Other group. If you were to try to open it, you would get the following error message:
When starting Windows in Safe Mode the extra drive wasn't there, but it would come back after starting the system normally or performing a clean boot. This suggests third-party software shouldn't be involved.
Collecting registry entries
The drive letter has to be referenced somewhere in the registry. By running the following command you can create a simple report:
What the command does is to scan the entire machine-related registry branch looking for anything containing the drive letter followed by a colon (i.e.
L:
).After removing unrelated entries (such as those containing strings like
HTML:
), this was the output:There aren't many results. The first one contains some interesting bits:
Uninstalling non-present devices
By default, the Device Manager utility doesn't display devices which aren't connected to the computer. What you need to do is to open a command prompt as administrator, and run the following command:
Then make sure to enable Show hidden devices on the View menu. The drive letter was associated to a Motorola DROID RAZR XT912 device at some point, so uninstall anything related.
You might also want to use USB Oblivion in order to remove any extra leftovers. Make sure to get the 32-bit or 64-bit version matching your operating system bitness.
Collecting registry entries - part 2
As expected, some entries were gone:
The
DOS Devices
subkey can be used to associate device names used by applications to those used internally by the operating system. Each entry is a string value (REG_SZ
) representing a symbolic link which gets created during the startup phase. In Windows 7, these are the values available by default:My assumption is that the extra drive wasn't meant to show up; perhaps a driver bug or some other reason (e.g. an unexpected shutdown) prevented it from being removed automatically. Installing the latest driver from the official Motorola support page might avoid the problem in the future.
Further reading
Resolution
The fix is surprisingly simple, once you know where to look:
Open an elevated command prompt, type or paste the following command, and press Enter:
Restart Windows to apply the changes.
Further reading