Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

share|improve this question
2  
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
add comment

2 Answers 2

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
share|improve this answer
add comment

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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