How do you map a virtual drive letter to a local path on Windows?
I recently researched this subject and these are my findings.
The subst command performs this function well, and its effect ends with the user session:
subst [drive1: [drive2:]Path]
vSubst by Thomas Bigler is a GUI for subst, it can also create a permanent association by running itself at startup (HKLM), just as subst could be configured to do.
For a permanent mapping this may not be preferable as anything loaded prior won't be able to reference the mapping, for instance entries added beforehand alongside it in HKLM -> [...] -> Run, Windows services, etc.
psubst on Google Code is an excellent batch script with the interface of subst (which it uses internally) with an additional optional /p
parameter for managing permanent mappings through the following key, which is loaded much earlier:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices
You can also map to your local drive as if it were a remote one with
net use G: \\localhost\c$\storage /persistent:yes
It does bind late in the login process though.