subst
From Wikipedia, the free encyclopedia
- Within Wikipedia,
subst:may refer to Template substitution.
| This article does not cite any references or sources. (July 2007) Please help improve this article by adding citations to reliable sources. Unverifiable material may be challenged and removed. |
subst is a command on the DOS operating system used for substituting paths on physical and logical drives as virtual drives. In the past it has been used for revealing hidden drives on security-tense PCs. The command subst is also available in post-Windows 2000 versions of the command line interpreter cmd.exe.[1]
Contents |
[edit] Usage
This is the Command Prompt output under Windows XP:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
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.
C:\>
This means that, for example, to map C:'s root to X: one would use subst X: C:\ at the command line. Upon doing this, a new drive called X: would appear under the My Computer Virtual Folder in Windows Explorer.
[edit] Custom Label
A custom label can be assigned to a drive letter created in this way only by way of the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\M\DefaultLabel
"M" represents the drive letter to assign a custom label to.
To make Windows Explorer show the new label select the drive letter, select "rename" from the drive letter context menu or press F2, delete the existing name/selection and press enter.
[edit] Limitations
It is important to note that not all Windows processes are able to use a drive letter created in this way.[citation needed]
Since (at least) Microsoft Windows XP SP2 Autorun.inf files present in the new drive letter are not being used, AutoRun/AutoPlay does not work on drive letters created in this way.
Since (at least) Microsoft Windows XP SP2 assigning a custom icon or label to the drive letter created this way via Autorun.inf does not work.
Since (at least) Microsoft Windows XP SP2 a custom label assigned to the drive letter created this way only appears if the source drive/volume does not have a volume label set (check and set with command line tool "label.exe").
[edit] See also
[edit] References
|
|||||||||||||||||||||||||||||
| This operating system-related article is a stub. You can help Wikipedia by expanding it |

