Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

SUBST typo works (or does it?)

Jun
16
0
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>
 
JP Software Forums" <[email protected]>; "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
 

Similar threads

Back
Top