Some digging around suggests that this is a common-ish problem, but instead of workarounds, I'd like to see if there is a way to fix this once and for all. Having to restart the shell to get basic functionality working is unacceptable in an enterprise-grade operating system!
A reproduction on a cleanly installed Windows 7 Enterprise X64 machine is as follows:
- Connect to an SMB share anywhere on your network
- Map it as a drive, selecting "reconnect at login"
- Disconnect the share via the context menu
The icon remains in Explorer. Attempting to disconnect it again results in an error saying the network location cannot be accessed.. You have to either reboot or kill/restart Explorer to get the "ghost" drive letter to vanish and become available to reuse.
I'd like to make this problem go away for my users, so that if they drop the drive for whatever reason, they can reuse the letter without delay, and without killing their explorer session or requiring a reboot.
I guess this is a two-part question.. First, is this possible, and if so, where would I look? I don't think there's a way to hook into the "drive disconnected" event off the top of my head, at least not without writing drivers.
net use
say when the drive is disconnected but Explorer still has the ghost?