mklnk / mklink problem

May 29, 2008
5
0
Why are mklnk and mklink creating directories instead of links?

[C:\Program Files]
>ver

TCC 10.00.57 Windows XP [Version 5.1.2600]

[C:\Program Files]
>echo %@fstype[c:]
NTFS

[C:\Program Files]
>*dir slick*

Volume in drive C is pkback# 001 Serial number is b06a:6f81
Directory of C:\Program Files\slick*

12/27/2008 8:45 <DIR> SlickEdit 2007
2/02/2009 10:18 <DIR> SlickEdit 2008
1/30/2009 15:51 <DIR> SlickEdit 2009 Beta1
2/18/2009 11:04 <DIR> SlickEdit 2009 Beta2
2/25/2009 16:22 <DIR> SlickEdit 2009 Beta3
1/25/2009 11:25 <DIR> SlickEdit Tools v2.0.3

[C:\Program Files]
>mklnk "SlickEdit 2009 Beta3"\ "SlickEdit 2009"
TCC: (Sys) The process cannot access the file because it is being used by another process.
"C:\Program Files\SlickEdit 2009"

[C:\Program Files]
>*dir slick*

Volume in drive C is pkback# 001 Serial number is b06a:6f81
Directory of C:\Program Files\slick*

12/27/2008 8:45 <DIR> SlickEdit 2007
2/02/2009 10:18 <DIR> SlickEdit 2008
2/27/2009 10:32 <DIR> SlickEdit 2009
1/30/2009 15:51 <DIR> SlickEdit 2009 Beta1
2/18/2009 11:04 <DIR> SlickEdit 2009 Beta2
2/25/2009 16:22 <DIR> SlickEdit 2009 Beta3
1/25/2009 11:25 <DIR> SlickEdit Tools v2.0.3

[C:\Program Files]
>rmdir "SlickEdit 2009"\

[C:\Program Files]
>mklink "SlickEdit 2009" ".\SlickEdit 2009 Beta3"\
TCC: (Sys) The request is not supported.

[C:\Program Files]
>mklink /D "SlickEdit 2009" ".\SlickEdit 2009 Beta3"\
TCC: (Sys) The request is not supported.

[C:\Program Files]
>mklink /H "SlickEdit 2009" ".\SlickEdit 2009 Beta3"\
TCC: (Sys) The request is not supported.

[C:\Program Files]
>mklink /J "SlickEdit 2009" ".\SlickEdit 2009 Beta3"\
TCC: (Sys) The process cannot access the file because it is being used by another process.
"SlickEdit 2009"

[C:\Program Files]
>*dir slick*

Volume in drive C is pkback# 001 Serial number is b06a:6f81
Directory of C:\Program Files\slick*

12/27/2008 8:45 <DIR> SlickEdit 2007
2/02/2009 10:18 <DIR> SlickEdit 2008
2/27/2009 10:34 <DIR> SlickEdit 2009
1/30/2009 15:51 <DIR> SlickEdit 2009 Beta1
2/18/2009 11:04 <DIR> SlickEdit 2009 Beta2
2/25/2009 16:22 <DIR> SlickEdit 2009 Beta3
1/25/2009 11:25 <DIR> SlickEdit Tools v2.0.3

(Sorry about the formatting; I am copying from the TC window and pasting into the forum message. Is there any way to fix the formatting of the dir listing?)
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
Number8 wrote:

> Why are mklnk and mklink creating directories instead of links?

None of that is reproducible here (nor have we had any other reports of
that behavior), so I'd suspect a problem with your system (possibly the
redirector).

There is definitely no way that TCC could be creating a directory; it's
calling a Windows API (DeviceIoControl) to create the junction.

MKLINK is only supported in Windows Vista and later.

What version of Windows are you running?

Rex Conn
JP Software
 
May 29, 2008
5
0
None of that is reproducible here (nor have we had any other reports of
that behavior), so I'd suspect a problem with your system (possibly the
redirector).

There is definitely no way that TCC could be creating a directory; it's
calling a Windows API (DeviceIoControl) to create the junction.

Thanks for the reply. I overlooked the note about Vista and MKLINK.

Since you suggested a local system problem, I tried sysinternals' Junction.exe, and got the same result -- directory created instead of a link.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
Number8 wrote:
| ---Quote (Originally by rconn)---
| None of that is reproducible here (nor have we had any other reports
| of
| that behavior), so I'd suspect a problem with your system (possibly
| the
| redirector).
|
| There is definitely no way that TCC could be creating a directory;
| it's
| calling a Windows API (DeviceIoControl) to create the junction.
| ---End Quote---
| Thanks for the reply. I overlooked the note about Vista and MKLINK.
|
| Since you suggested a local system problem, I tried sysinternals'
| Junction.exe, and got the same result -- directory created instead of
| a link.

Could this (i.e., the use by the Windows Installer of an API call which in
Vista creates a junction, but in XP a directory) be the explanation why the
V9 installer, when it was given the name of an existing junction as the
installation directory, removed the junction and created a directory in its
place?
--
Steve
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
Steve Fábián wrote:

> Number8 wrote:
> | ---Quote (Originally by rconn)---
> | None of that is reproducible here (nor have we had any other reports
> | of
> | that behavior), so I'd suspect a problem with your system (possibly
> | the
> | redirector).
> |
> | There is definitely no way that TCC could be creating a directory;
> | it's
> | calling a Windows API (DeviceIoControl) to create the junction.
> | ---End Quote---
> | Thanks for the reply. I overlooked the note about Vista and MKLINK.
> |
> | Since you suggested a local system problem, I tried sysinternals'
> | Junction.exe, and got the same result -- directory created instead of
> | a link.
>
> Could this (i.e., the use by the Windows Installer of an API call which in
> Vista creates a junction, but in XP a directory) be the explanation why the
> V9 installer, when it was given the name of an existing junction as the
> installation directory, removed the junction and created a directory in its
> place?

No - the Windows Installer isn't involved at all. The OP was reporting
a problem with the TCC internal MKLNK command creating a directory
instead of a junction. (But since junction.exe has the same problem, it
appears to be a local issue.)

Rex Conn
JP Software
 
May 20, 2008
3,515
4
Elkridge, MD, USA
rconn wrote:
| Steve Fábián wrote:
|
|
| ---Quote---
|| Number8 wrote:
||| ---Quote (Originally by rconn)---
||| None of that is reproducible here (nor have we had any other reports
||| of
||| that behavior), so I'd suspect a problem with your system (possibly
||| the
||| redirector).
|||
||| There is definitely no way that TCC could be creating a directory;
||| it's
||| calling a Windows API (DeviceIoControl) to create the junction.
||| ---End Quote---
||| Thanks for the reply. I overlooked the note about Vista and MKLINK.
|||
||| Since you suggested a local system problem, I tried sysinternals'
||| Junction.exe, and got the same result -- directory created instead
||| of a link.
||
|| Could this (i.e., the use by the Windows Installer of an API call
|| which in Vista creates a junction, but in XP a directory) be the
|| explanation why the V9 installer, when it was given the name of an
|| existing junction as the installation directory, removed the
|| junction and created a directory in its place?
| ---End Quote---
| No - the Windows Installer isn't involved at all. The OP was
| reporting
| a problem with the TCC internal MKLNK command creating a directory
| instead of a junction. (But since junction.exe has the same problem,
| it appears to be a local issue.)

I think you misunderstood me. I was postulating the posibility that TCC's
MKLINK command (the one intended for Vista only, not the older MKLNK) and
the Windows Installer both call the same API which in Vista correctly
creates a junction, but in XP creates a directory even if the new directory
replaces a junction with the same name. If my postulate is true, the problem
is still not in TCC, but in the API. However, what works against the
postulate is that MKLINK/J works correctly on my WinXP (creates a junction).
The whole issue is not significant for me, because I now use a different
naming convention, thus installation directories are now always real ones,
not junctions.
--
Steve
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
Steve Fábián wrote:

> rconn wrote:
> | No - the Windows Installer isn't involved at all. The OP was
> | reporting
> | a problem with the TCC internal MKLNK command creating a directory
> | instead of a junction. (But since junction.exe has the same problem,
> | it appears to be a local issue.)
>
> I think you misunderstood me. I was postulating the posibility that TCC's
> MKLINK command (the one intended for Vista only, not the older MKLNK) and
> the Windows Installer both call the same API which in Vista correctly
> creates a junction, but in XP creates a directory even if the new directory
> replaces a junction with the same name. If my postulate is true, the problem
> is still not in TCC, but in the API. However, what works against the
> postulate is that MKLINK/J works correctly on my WinXP (creates a junction).
> The whole issue is not significant for me, because I now use a different
> naming convention, thus installation directories are now always real ones,
> not junctions.

The installer never tries to create a junction, and it definitely does
not call the Vista-only API (which would result in crashing the
installer, not creating a directory).

MKLINK /J calls MKLNK to create the junction, so it never makes the
Vista API call.

TCC checks the Windows version and won't let you make a MKLINK call to
the Vista API from XP.

Rex Conn
JP Software
 
May 20, 2008
3,515
4
Elkridge, MD, USA
rconn wrote:
| The installer never tries to create a junction, and it definitely does
| not call the Vista-only API (which would result in crashing the
| installer, not creating a directory).
|
| MKLINK /J calls MKLNK to create the junction, so it never makes the
| Vista API call.


Thanks for the explanation.

| TCC checks the Windows version and won't let you make a MKLINK call to
| the Vista API from XP.

I know, it gives the perfect error message: The request is not supported.

--
Steve
 
Similar threads
Thread starter Title Forum Replies Date
vefatica MKLNK? Support 5
Stefano Piccardi MKLNK exit status Support 9
A MKLNK not deleting symbolic link Support 1
Joe Caverly MKLINK and Streams and DEL Support 4
B MKLINK requires admin - fails silently. Support 1
Stefano Piccardi Issue: MKLINK /J creates invalid link [TCC 14.03.53] Support 4
Stefano Piccardi Fixed mklink /X junction\ Support 3
samintz Fixed GPF from MKLINK Support 1
fpefpe Fixed MKLINK Support 2
J WAD MKLINK File symlinks are absolute Support 7
J WAD MKLINK & XP Support 4
Stefano Piccardi WAD MKLINK CMD compatibility, MKLINK /X Support 6
Stefano Piccardi Fixed MKLINK /D Support 4
Stefano Piccardi 13.0.31 2 MKLINK TCC vs CMD issues Support 2
David McClelland MKLINK /x discrepancy Support 0
R No Error Message when running mklink as limited user Support 3
W mklink and Volume Shadow Copies Support 5
Dick Johnson Weird Color Problem Support 8
fishman@panix.com Problem with 27.15 Support 2
M Problem with VSDevCmd.bat in VS 16.7.3 Support 0
R Problem with @INT[ value] in V26 Support 9
M Selecting test "off by one" problem in Take command Support 4
Alpengreis UTF-8 problem in TCC related to Python Support 7
K_Meinhard Small problem in german IDE 26 Support 3
B Problem with color in nested shells Support 1
Joe Caverly Problem creating and switching to a DESKTOP Support 9
vefatica Another popup problem Support 10
Alpengreis ffind dialog (/W) problem Support 4
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
B IF command problem in tcexit.btm Support 9
fishman@panix.com Problem at Startup of TCC Support 3
P Problem with SFTP copies Support 7
P Problem with FTP copies Support 10
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
R Problem with %_do_loop in nested do loops Support 2
fishman@panix.com New Problem with later Windows 10 Support 10
Peter Murschall A little problem with LEAVE and COMMENT Support 5
M Handling of %~I problem Support 4
WinLanEm FOR problem Support 18
K Problem With SCRPUT /u Support 3
vefatica What's TCMD's problem with ^e[0m? Support 13
Peter Murschall IDE: RTL with non-English resources-problem is back in Build 28 Support 4
rps Regex problem: \xnn not recognized as a hex character Support 0
rps PRIORITY LOW problem Support 1
old coot Regex problem: \xnn not recognized as a hex character Support 12
vefatica Another problem with build 22. Support 3
Alpengreis [23.x] Download-Problem Support 2
S Problem with " Support 3

Similar threads