SUBST typo works (or does it?)

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jun 6, 2008
15
0
#1
Today I made a typo using SUBST (under WinXP).
[I wanted SUBST R:, but typed SUBST 4:]
This works! You can change drives, make subdirs etc.

Q: Why does this work?

Q: Is it save to use this for temporary drive assignments?

Q: Are there any other problems/gotchas when you use this?

Did some tests:
You can use (almost?) all of the non-poison characters.
SUBST-assignments don't show in SUBST-list.
You can't start Explorer in that SUBSTed drive.
You can make a subdir, SUBST that dir with a driveletter and start Explorer there.
[C:\]rem Start Capture
[C:\]md TempRoot
[C:\]TempRoot\
[C:\TempRoot]truename .
C:\TempRoot
[C:\TempRoot]subst
<empty list="">===Empty list===
[C:\TempRoot]subst #: .
[C:\TempRoot]#:
[#:\]truename .
C:\TempRoot\
[#:\]subst
<empty list=""></empty></empty>===Empty list===
<empty list=""><empty list=""> [#:\]start .
<error>===error===
[#:\]md letterP
[#:\]letterP\
[#:\letterP]truename .
C:\TempRoot\letterP
[#:\letterP]subst
<empty list="">===Empty list===
[#:\letterP]subst p: .
[#:\letterP]p:
[P:\]truename .
#:\letterP\
[P:\]subst
P:\: => #:\letterP
[P:\]start .
<ok>===ok===
[P:\]rem End Capture

--
haskell</ok></empty></error></empty></empty>
 
#2
JP Software Forums" <neil@jpsoft.com>; "haskell wrote:
| Today I made a typo using SUBST (under WinXP).
| [I wanted SUBST R:, but typed SUBST 4:]
| This works! You can change drives, make subdirs etc.
|
| Q: Why does this work?
|
| Q: Is it save to use this for temporary drive assignments?
|
| Q: Are there any other problems/gotchas when you use this?
|
| Did some tests:
| You can use (almost?) all of the non-poison characters.
| SUBST-assignments don't show in SUBST-list.
| You can't start Explorer in that SUBSTed drive.
| You can make a subdir, SUBST that dir with a driveletter and start
| Explorer there.

Interesting observations about the WinXP version of MS' program SUBST.EXE.

Many of the observations are well known, i.e., the ability to create virtual
drive characters that are not letters.

Note that TCC does not detect them in its search for drives, e.g., in
%_ready. However, explicit reference in commands and variable functions
(e.g. TRUENAME, @diskfree[]) works correctly.
--
Steve