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

@TRUENAME not seeing through junction

Discussion in 'Support' started by vefatica, Jun 21, 2013.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,959
    Likes Received:
    30
    Code:
    c:\users\vefatica> dir /a /k /m tem*
    2012-03-09  12:12    <JUNCTION>    Templates [C:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Templates]
     
    c:\users\vefatica> echo "%@truename[%userprofile\templates]"
    "C:\Users\vefatica\templates"
     
    c:\users\vefatica> ver
    
    TCC  15.01.51   Windows 7 [Version 6.1.7601]
    It *DOES* work with v14.
    Code:
    c:\users\vefatica> echo "%@truename[templates]"
    "C:\Users\vefatica\AppData\Roaming\MicrosoftWindows\Templates"
     
    c:\users\vefatica> ver
     
    TCC  14.03.59  Windows 7 [Version 6.1.7601]
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,959
    Likes Received:
    30
    This problem does not occur if v15 is running elevated. (Recall, v14 can do it un-elevated.)
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    I don't know what you're trying to do here -- your v15 and v14 examples are different.

    The @TRUENAME code has not changed in v15.
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,959
    Likes Received:
    30
    Well it isn't working. Here it is again.
    Code:
    c:\users\vefatica> echo %_4ver "%@truename[templates]"
    15.01 "C:\Users\vefatica\templates"
    
    c:\users\vefatica> g:\tc14\tcc /c `echo %_4ver "%@truename[templates]"`
    14.03 "C:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Templates"
    and again
    Code:
    v:\> echo %_4ver "%@truename[%userprofile\templates]"
    15.01 "C:\Users\vefatica\templates"
    
    v:\> g:\tc14\tcc /c `echo %_4ver "%@truename[%userprofile\templates]"`
    14.03 "C:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Templates"
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,959
    Likes Received:
    30
    V14 and v15 also give different results for a mount point. V14's result seems more informational. From CMD ...
    Code:
    v:\> g:\tc14\tcc /c echo %_4ver %@truename[g:\tc15\plugins]
    14.03 Volume{53c5ee55-6a1a-11e1-b966-806e6f6e6963}\
     
    v:\> g:\tc15\tcc /c echo %_4ver %@truename[g:\tc15\plugins]
    15.01 G:\tc15\plugins
     
  6. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    The TCC code may be the same, but don't you use a different version of Visual Studio for V15 then you did for V14? Isn't it typical of MS to change RTL / API code without notice?
     
  7. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,959
    Likes Received:
    30
    In case you haven't narrowed this down yet, the difference (new behavior from v15) occurs when there's no trailing backslash on the junction or mount point name.
    Code:
    v:\> ver
    TCC  15.01.51   Windows 7 [Version 6.1.7601]
    
    v:\> echo %@truename[%userprofile\cookies]
    C:\Users\vefatica\cookies
    
    v:\> echo %@truename[%userprofile\cookies\]
    C:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Cookies\
    
    v:\> echo %@truename[g:\tc15\Plugins]
    G:\tc15\Plugins
    
    v:\> echo %@truename[g:\tc15\Plugins\]
    Volume{53c5ee55-6a1a-11e1-b966-806e6f6e6963}\
    Code:
    v:\> ver
    TCC  14.03.59   Windows 7 [Version 6.1.7601]
    
    v:\> echo %@truename[%userprofile\cookies]
    C:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Cookies
    
    v:\> echo %@truename[%userprofile\cookies\]
    C:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Cookies
    
    v:\> echo %@truename[g:\tc15\Plugins]
    Volume{53c5ee55-6a1a-11e1-b966-806e6f6e6963}\
    
    v:\> echo %@truename[g:\tc15\Plugins\]
    Volume{53c5ee55-6a1a-11e1-b966-806e6f6e6963}\
     
  8. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    How is that informational -- what would you do with that UUID?
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    Not reproducible here. It's calling a Windows API, and I get the same results from that API whether I'm elevated or not (Windows 8 x64).
     
  10. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,959
    Likes Received:
    30
    I'm just telling you what I see. Here, Win7/32, it's the same elevated as un-elevated, and different from v14 when there's no trailing backslash.
    Code:
    V:\> type tn.bat
    @echo off
    g:\tc14\tcc /c echo %%_4ver %%@truename[g:\tc15\plugins]
    g:\tc15\tcc /c echo %%_4ver %%@truename[g:\tc15\plugins]
    echo.
    g:\tc14\tcc /c echo %%_4ver %%@truename[g:\tc15\plugins\]
    g:\tc15\tcc /c echo %%_4ver %%@truename[g:\tc15\plugins\]
    echo.
    g:\tc14\tcc /c echo %%_4ver %%@truename[c:\users\vefatica\cookies]
    g:\tc15\tcc /c echo %%_4ver %%@truename[c:\users\vefatica\cookies]
    echo.
    g:\tc14\tcc /c echo %%_4ver %%@truename[c:\users\vefatica\cookies\]
    g:\tc15\tcc /c echo %%_4ver %%@truename[c:\users\vefatica\cookies\]
    Code:
    V:\> tn.bat
    14.03 Volume{53c5ee55-6a1a-11e1-b966-806e6f6e6963}\
    15.01 G:\tc15\plugins
     
    14.03 Volume{53c5ee55-6a1a-11e1-b966-806e6f6e6963}\
    15.01 Volume{53c5ee55-6a1a-11e1-b966-806e6f6e6963}\
     
    14.03 C:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Cookies
    15.01 C:\users\vefatica\cookies
     
    14.03 C:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Cookies
    15.01 C:\Users\vefatica\AppData\Roaming\Microsoft\Windows\Cookies\
     
  11. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    I'm just telling you that I don't see it here!

    But the trailing \ will be treated differently -- without it, TCC tests if the parent directory is a reparse point. With it, it tests if the directory is a reparse point.

    What I don't understand is -- why does this matter to you? What are you trying to do in v15 that you cannot accomplish?
     
  12. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,959
    Likes Received:
    30
    My point is that the behavior is different from v14 (and that, in itself, is undesirable). It might break somebody's batch file (probably none of mine).
    Do you have Win7/32 to test it on?

    Simply, there's not an easy way in Explorer to figure out what c:\users\vefatica\cookies is a link to. It's not unreasonable to try
    Code:
    echo %@truename[c:\users\vefatica\cookies]
    Here, Win7/32, that gives the wrong answer in v15 and the right answer in v14. ... just doesn't seem right ... don't know what else to say.
     

Share This Page