Substitute for W2K

Home Commercial Tools Free Downloads Contact


When Windows® 2000 first appeared, I was disappointed by the "subst" command no longer being able to map a drive to a UNC path properly (it appears to work, but the drive has a red cross on it in the Windows® Explorer (MS KB Article Q269163) and is not accessible (MS KB Article Q218740)).

For those of you who do not remember, in NT®4 "net use" could not be used to map a drive to a subfolder of a network share, but only to the share itself. This was not always good enough and necessitated the use of the standard "subst" command which could handle this.

It's fair enough that in W2K® one can use "net use" for that, but a lot of scripts were broken because of this change.

This new "feature" is evidently here to stay (4 Service Packs after the release - and it's still there), but at the second glance it's clear that this evidently was a simple typo-caused bug:

"Subst" creates a DOS Device link in the Global Windows Namespace in the form of "\??\UNC\...", but because Windows® Kernel actually expects to see "\??\Unc\..." (note the case difference) and is internally case-sensitive (a fact that Microsoft® vehemently denied last time I checked), this does not work as intended (clearly, it was intended to work or "subst" would refuse to accept the request).

This little tool works the same way as the standard "subst" command does, except that it uses the correct letter case and it lacks the training wheels: it re-substitutes an already substituted drive without a prompt, which looked like a good idea at the time I was writing it (physical and "net use"-mapped disks are safe - it errs out if you attempt to substitute either one).

MS KB Article Q269163 bug is, of course, still there with its little red cross (meaning: "disconnected") in Windows® Explorer, but the mapping works just fine.

By downloading this software you are accepting this License.

Download (~25k): Subst2k