Welcome!

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

SignUp Now!

@TRUENAME not seeing through junction

May
12,846
164
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]
 
This problem does not occur if v15 is running elevated. (Recall, v14 can do it un-elevated.)
 
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"
 
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
 
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}\
 
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).
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\
 
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?
 
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?
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.
 

Similar threads

Back
Top