Because the subst commands provided in windows are often used to map a long path into a short path, it is quite convenient to use them.
Subst u: d: \ xxxxxxxxx \********\******
To delete the object, directly subst u:/d
However, it has two major defects:
1. It is session-related. Restart the machine and the ing will be automatically lost.
2. Because it is session-related, it is only valid for the current session id, that is, it is only valid for the current user. If you create a path ing and a system service wants to access it, it cannot be accessed. You must write your own code to obtain the actual path. Or change the log on Attribute of the Service to the current user.
These are not good solutions.
Even a search, found that psubst in the http://code.google.com/p/psubst/ is exactly what we want, it put the path under HKLM, so that all users should be able to access. At the same time, the path will not be lost after restart.
It will be in:
REGEDIT4
[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ DOS Devices]
"Z:" = "\\?? \ C: \ Documents ents and Settings \ All Users \ Shared Documents ents"
Author "iihero @ iteye [focusing on database and information retrieval technologies"