Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a directory on another drive that I want to show as a new virtual drive. How can I do that?

share|improve this question

2 Answers 2

up vote 58 down vote accepted

Use the subst command:

subst X: F:\some\folder

There is also a great freeware utility called Visual Subst to make things even easier:

alt text

share|improve this answer
yes I tried this before, but it doesnt auto-mount the dir on boot. – user11955 Feb 16 '10 at 4:20
At the bottom of the application there is a checkbox Apply virtual drives on Windows startup if that's what you're after. You could also use a batch script with subst commands and place it in your startup folder. – John T Feb 16 '10 at 4:24
I realize that the option is there, it just doesn't work. probably because I have a space in the folder name (that I cant remove) – user11955 Feb 16 '10 at 4:30
Possibly. There is also the startup folder in your start menu you can use. Make a batch script with subst commands in it and quote the paths with spaces. An example of 1 line would be subst X: "C:\Program Files" – John T Feb 16 '10 at 4:31
Or add it as a run entry in the registry. It gets processed and the subst drive gets added quite early in the boot process then. – Fiasco Labs Oct 1 '12 at 15:31

I used the registry edit on wikipedia so Windows would automaticaly create the drive when starting (tested on Windows 8.1):

  1. Run regedit.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices
  3. Add a new String Value with the drive letter as the name
    • example: X:
  4. Set the value using one of the following formats (Replace C:\some\directory with the folder path):
    • \??\C:\some\directory
    • \DosDevices\C:\some\directory
    • \Device\Mup\\C$\some\directory
  5. Restart the computer.

Another option is to use a VHD (or use a USB and skip steps 2 - 4):

  1. Open Disk Management.
  2. Open the Action menu and select Create VHD and follow the prompts.
  3. Right click the new VHD (bottom half, right click on the gray section on the left) and click Initialize Disk and press OK.
  4. Right click the data section of the VHD (bottom half, white and black rectangle with the text "Unallocated"), select New Simple Volume... and follow the prompts.
  5. Right click the data section of the VHD and select Change Drive Letter and Paths..., click Add..., indicate the folder you want to mount the drive to, and click OK for the two boxes.

See also:

share|improve this answer

Your Answer


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.