1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SUBST typo works (or does it?)

Discussion in 'Open Forum' started by haskell, Nov 13, 2008.

  1. haskell

    Joined:
    Jun 6, 2008
    Messages:
    15
    Likes Received:
    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>
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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
     

Share This Page