How to use drive letters and mount points for the same disk drive

Author: NetworkAdminKB.com

Created: 2011-09-01

Modified: 2011-11-08

 

Issue:

For various reasons you may need to present a physical or logical drive as a mount point to an existing file system.  Here is a screenshot of showing the use of mount points in Windows 2008 R2.

 

 

However, using mount points may create a unique challenge for third party tools like disk sizing utilities or other disk monitoring utilities.

 

Cause:

Some third party tools may not always be written well enough to deal with mount points properly.

 

Workarounds:

The workaround needed may vary by product or your specific needs, but here are several different ways you may be able to assign a drive letter to the mount point to allow these third party utilities to work correctly.

 

Note: In general the third party utility may need to run under a user context, if the utility is installed as a service, you may need to configure the service to use a user account.  Your specific needs may vary so experimentation may be needed.

 

Method 3 is the recommended approach, but the others may work as well.

 

Method 1

Create a batch file to run the built-in subst command to create a virtual drive letter for the existing mount points and place it in the user account’s startup folder.

 

Here is an example

 

@Echo Off

Subst f: d:\mount\db

Subst g: d:\mount\log

 

The user must log off and back on or the service must be restarted for the changes to take affect.

 

Method 2

Edit the registry to run the built-in subst command during computer startup or user logon by leveraging the appropriate Run registry key.  The easiest way to do this is to create a registry file (.reg), and double click the file to import the settings into the registry.

 

Example to run during computer boot

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]

"F Drive"="subst f: d:\\mount\\db"

"G Drive"="subst g: d:\\mount\\log"

 

The computer must be rebooted for the changes to take effect.

 

Example of user logon

REGEDIT4

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]

"F Drive"="subst f: d:\\mount\\db"

"G Drive"="subst g: d:\\mount\\log"

 

The user must log off and back on for the changes to take effect.

 

Method 3

Edit the registry to create virtual drives to the desired mount points across reboots for all users by leveraging the DOS Devices registry key.  The easiest way to do this is to create a registry file (.reg), and double click the file to import the settings into the registry.

 

Here is an example registry file.

 

REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]

"F:"="\\??\\D:\\Mount\\db"

"G:"="\\??\\D:\\Mount\\log"

 

After configuring the registry the computer must be rebooted for the changes to take affect.

 

Method 4

Use the third party psubst command to create persistent subst virtual drive letters across reboots for all users.

 

http://code.google.com/p/psubst/

 

Article ID: 446, Created On: 11/8/2011, Modified: 11/8/2011