Syntax
SUBST [drive1: [drive2:]path]
SUBST drive1: /D
drive1: Specifies a virtual drive to which you want to assign a path.
[drive2:]path Specifies a physical drive and path you want to assign to a virtual drive.
/D Deletes a substituted (virtual) drive.
Type SUBST with no parameters to display a list of current virtual drives.
Subst Examples
1) To create a virtual drive F for the path, SALES\LETTERS (under the root directory) of drive C, enter
subst f: c:\sales\letters
Read and write requests to either drive F or to C:\SALES\LETTERS will be stored in the C:\SALES\LETTERS d
irectory area.
2 ) subst N: C:\windows
now if you enter in N: you will see the Windows folder’s contents. This is done on a per-user basis (every user can have its N: pointing to a different directory) and it disappears on the first reboot.
Make it Permenent
If you want to have it permanent, there is a hidden trick, creating a new key in the registry.You have to go to
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices
and there create a key named with the drive letter you want, colon included (f,N: in our example) and with this value:
\??\c:\\windows
you can obviously change c: and windows for whatever folder you want, but remember to double the backslash after the unit letter, because it won’t work with a single backslash.
Six DOS commands cannot be used with virtual drives created with the SUBST command. They are:
CHKDSK
DISKCOPY
FDISK
FORMAT
LABEL
SYS
Incoming search terms:
- subst permanent windows 7 (26)
- subst Windows 7 (24)
- windows 7 subst permanent (14)
- windows 7 virtual drive letter (14)
- substitute drive letter (8)
- subst windows 7 permanent (8)
- windows 7 permanent subst (7)
- virtual drive letter windows 7 (6)
- HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices (5)
- windows virtual drive letter (5)
3 Responses to “How to Map a fake drive letter to a folder in Vista/XP”
Sorry, the comment form is closed at this time.
I want to create fake user account or just user account folders on Windows XP without creating user accounts, is there any software that can do that? please reply me ASAP to my mail id. Thanks in advance.
-Hariharakumar
For Windows 7, the Registry Key is:
HKLM\SYSTEM\ControlSet002\Control\Session Manager\DOS Devices
Quote Greenheart START
“For Windows 7, the Registry Key is:
HKLM\SYSTEM\ControlSet002\Control\Session Manager\DOS Devices”
Quote Greenheart END
This is not correct.
In W7 the reg-key is always
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices
But – your key works too. (not always)
QUOTE Admin START
“it won’t work with a single backslash”
QUOTE Admin END
Works also !with! a single backslash in Win7 – tested.