Windows – How to make SUBST mapping persistent across reboots?

Does Windows (XP or later) have a built-in way to create persitent drive mappings, like the ones SUBST creates? I found a 3rd party tool psubst. Is there a way to do it without 3rd party tools?

Solution:

Well Wikipedia mentions:

C:>SUBST /?Associates a path with a drive letter.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.

So you can associate paths with drive letters using subst. The Persistent SUBST command (psubst) software seems to be darn handy, and they provide a solution to run it from startup:

https://code.google.com/p/psubst/#Inconstancy

 

Inconstancy

   

However restart of a system destroys a virtual disk. What to do? A  disk can be created after startup. But what to do, when a disk is  needed on early steps of a startup? For example, to run services?  There is system feature to start a virtual disk from the system  registry:

REGEDIT4 [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerDOS Devices] "Z:"="\??\C:\Documents and Settings\All Users\Shared Documents"

   

It is enough to create a text file with the extension .REG and run  it. When the next starting up of a system, the virtual disk will be  exist at logon. It needs to define a name of disk and path. Note that  each backslash in the path is doubled.

In Windows, you can run the registry editor as follows:

  1. Start » Run… (or hit Win+R)
  2. Type: regedit
  3. In Windows Vista and above, UAC will pop up, click “Yes”.