All in the title. I'm looking for how to reference a local, not network, path, as a virtual drive letter. An innocuous example: C:\Storage as G:

link|improve this question
1  
Deleting from the lettered drive seems to have the annoying side effect of bypassing the recycle bin. :( – Christopher Galpin Apr 13 '10 at 10:25
feedback

2 Answers

up vote 10 down vote accepted

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
link|improve this answer
feedback

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.

link|improve this answer
I don't think I knew that. Clever. – Christopher Galpin Sep 27 '11 at 21:18
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.