Introduction to Virtual Drive ing tool SUBST in Windows

Source: Internet
Author: User

Not only have you ever used 'ing Network Drivers ', but the one in the right-click menu of my computer, which maps the network shared folder into a virtual drive, the SUBST tool that I want to talk about today (which is built on the XP system) has a similar function. It maps the local folder into a virtual drive, of course, it is also for convenient access.
What should I do? For example, if you often want to access a folder under drive D or a subdirectory, is there a way to quickly access it? You can add a shortcut on the desktop, But it's ugly. It's a way to change the icon or put the shortcut in the Start Menu. Forget it. Let's take a look at what SUBST can do!
At the command prompt, run SUBST /? You can use it with a machete.

SUBST [drive1: [drive2:] path]
SUBST drive1:/d

Drive1: Specifies the virtual drive to which the path is to be assigned.
[Drive2:] path specifies the physical drive and
Path.
/D Delete the replaced (virtual) Drive.

Enter SUBST without adding any parameters to display the current Virtual Drive list.

Examples
Subst p: D: \ tools \ common tools or subst p: D: tools \ common tools
It means to map the 'commonly used tools' folder under D: \ tools into drive P:, that is to say, you can open my computer and have an extra P disk with a machete, if you want to change the content displayed on disk P, you must first uninstall it, which is a bit like the virtual optical drive, such as subst p:/d, and then map it to the folder as above, of course, the drive letter is set by you, but it cannot be repeated (this should be easy to understand, in fact, it is just adding a pointer, one of your fingers cannot hold two eyes at the same time, right ), the same folder can be mapped to different drives (as many people can point their fingers to one of your eyes), but this is not necessary.

After learning how to use it, Let's take note of the following points:
1.
When the folder name contains spaces, the entire path should be enclosed in double quotation marks.

2.
The drive mapped with the SUBST will disappear after restart (the same is true for Microsoft's virtual optical drive). Isn't that practical?
Do not forget to run automatically at startup. SUBST runs the command to make it into a batch file so that it can run automatically at startup, there are two formats of the batch processing files that can be executed in XP (in fact, only ext is different), one is. BAT, and another one is. CMD
Instance (I have made four disks, haha, lazy, no way ):
Enter
Subst k: "D: \ Program Files"
Subst l: D: \ tools
Subst m: D: \ Download
Subst n: D: \ myweb
Change the path as needed, save it, and change the extension to. bat or. cmd.
Next we will solve how to run it automatically. There are many methods, at least three:

(1) The simplest thing is to drag this file to the beginning-Program-Starting,

(2) run in the Registry and add it to user run (in fact, you can add it to the Winlogon shell. Remember that there was a virus running like this)
User run
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Run
Run
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run

Take adding in user run as an example (the difference between adding here and adding in run is that run is valid for all users, and user run is only valid for the current user)
Run regedit and find HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Run
Create a new string on the right and double-click it to add the value to the full path of the created batch file (if you put the batch file under system32, you only need to set the value to its file name)

(3) Schedule the task and set it to run at login.

3.
The volume label setting, If You Do map, you certainly want to set the volume label-the disk name (not the drive letter), because when there are more disks, sometimes you don't know what is in it, here I have a question, the scale can contain a maximum of 11 characters in English and a maximum of 11 characters in Chinese. That is to say, Chinese can contain 22 bytes, and English can contain only 11 bytes!

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.