Mapped driver in windows and its real path

Source: Internet
Author: User

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"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.