Oct 272008

If you want to Map a fake drive letter to a folder you have use subst command.Use the SUBST command to substitute a drive letter for a path in order to treat a virtual drive (a reserved area rather than an actual disk drive) as a physical drive.

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:


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:



Incoming search terms:

  3 Responses to “How to Map a fake drive letter to a folder in Vista/XP”

  1. 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.


  2. For Windows 7, the Registry Key is:
    HKLM\SYSTEM\ControlSet002\Control\Session Manager\DOS Devices

  3. 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)

    “it won’t work with a single backslash”
    QUOTE Admin END

    Works also !with! a single backslash in Win7 – tested.

Sorry, the comment form is closed at this time.