[TC 9 All] cant launch the programs in Junction/Link Path
Moderators: Hacker, petermad, Stefan2, white
[TC 9 All] cant launch the programs in Junction/Link Path
Example:
a exe file in the symbol link path
d:\program file\apps\exam\exam.exe
in path "d:\program file\tool" make a relative path link
mklink /D apps ..\apps
and the exe file path in "d:\program file\tools\apps\exam\exam.exe" could not be launch
in the windows's explorer, it can be run.
if the path is made with "/J" to be a absolute path, it also can be run.
it's not all program has this problem.
the problem has this results
1. double click exe file, cant
2. run the exe with absolute path in the exe's relative link path, cant
3. run the exe with absolute path in the other real path, can
4. run the exe in bar with path in itself, cant
a exe file in the symbol link path
d:\program file\apps\exam\exam.exe
in path "d:\program file\tool" make a relative path link
mklink /D apps ..\apps
and the exe file path in "d:\program file\tools\apps\exam\exam.exe" could not be launch
in the windows's explorer, it can be run.
if the path is made with "/J" to be a absolute path, it also can be run.
it's not all program has this problem.
the problem has this results
1. double click exe file, cant
2. run the exe with absolute path in the exe's relative link path, cant
3. run the exe with absolute path in the other real path, can
4. run the exe in bar with path in itself, cant
Last edited by thomasmo on 2016-08-04, 22:54 UTC, edited 2 times in total.
2thomasmo
mklink /D exam ..\apps\exam
Otherwise I don't see how the exam link could point at d:\program file\apps\exam\
I am not quite sure whether d:\program file\apps\exam\exam.exe also has to be a symlink to an exam.exe somewhere else, but even if I try that, it still works for me. Or is d:\program file\apps\exam\ a symlink in your example?
Don't you mean:in path "d:\program file\tool" make a relative path link
mklink /D exam ..\exam
mklink /D exam ..\apps\exam
Otherwise I don't see how the exam link could point at d:\program file\apps\exam\
I tried (after using mklink /D exam ..apps\exam) with a copy of totalcmd64.exe renamed to exam.exe - it works fine - can you give an example of an exe (common to most windows users), where it doesn' work.it's not all program has this problem.
I am not quite sure whether d:\program file\apps\exam\exam.exe also has to be a symlink to an exam.exe somewhere else, but even if I try that, it still works for me. Or is d:\program file\apps\exam\ a symlink in your example?
Last edited by petermad on 2016-08-04, 15:08 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
2MVV
If I while in d:\program file\apps\exam\tools
perform: mklink /D exam ..\exam
I get: symbolic link created for exam <<===>> ..\exam
I then have a SymlinkD folder link named exam in d:\program file\apps\exam\tools and if I double click on that link I just get an error sound - same thing in Explorer.
If I while in D:\test\test1\test
perform: mklink /D test ..\test
I get: symbolic link created for test <<===>> ..\test
I then have a SymlinkD folder link named test in D:\test\test1\test and if I double click on that I go to d:\test\test1\test\test that has a symlink folder named test, and if i Doubleclick on that I go to d:\test\test1\test\test\test with a symlink folder named test - etc. etc. etc. - same thing in Explorer.
To thomasmo's example:
If I while in d:\program file\tools
perform: mklink /D exam ..\exam
I get: symbolic link created for exam <<===>> ..\exam
I then have a SymlinkD folder link named exam in d:\program file\tool and if I double click on that link I just get an error sound - same thing in Explorer.
This makes sense, since there is no exam folder in the parent folder of d:\program file\tool (i.e. d:\program file) and that is why I suggest that it should be: mklink /D exam ..\apps\exam since there IS a folder path named apps\exam in the parent folder of d:\program file\tool.
It is also a little confusing that thomasmo writes:
If I while in d:\program file\apps\exam\tools
perform: mklink /D exam ..\exam
I get: symbolic link created for exam <<===>> ..\exam
I then have a SymlinkD folder link named exam in d:\program file\apps\exam\tools and if I double click on that link I just get an error sound - same thing in Explorer.
If I while in D:\test\test1\test
perform: mklink /D test ..\test
I get: symbolic link created for test <<===>> ..\test
I then have a SymlinkD folder link named test in D:\test\test1\test and if I double click on that I go to d:\test\test1\test\test that has a symlink folder named test, and if i Doubleclick on that I go to d:\test\test1\test\test\test with a symlink folder named test - etc. etc. etc. - same thing in Explorer.
To thomasmo's example:
If I while in d:\program file\tools
perform: mklink /D exam ..\exam
I get: symbolic link created for exam <<===>> ..\exam
I then have a SymlinkD folder link named exam in d:\program file\tool and if I double click on that link I just get an error sound - same thing in Explorer.
This makes sense, since there is no exam folder in the parent folder of d:\program file\tool (i.e. d:\program file) and that is why I suggest that it should be: mklink /D exam ..\apps\exam since there IS a folder path named apps\exam in the parent folder of d:\program file\tool.
It is also a little confusing that thomasmo writes:
and later writes:in path "d:\program file\tool" make a relative path link
Is it tool or tools ?and the exe file path in "d:\program file\tools\exam\exam.exe" could not be launch
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
petermad,
You can specify full path to symlink, it doesn't matter, you only should use relative target path.
You're right, I've messed it up a bit too with thomasmo's example, please check this one: d:\program file\apps\tools => ..\exam === d:\program file\apps\exam. You can create it using command mklink /D exam ..\exam from d:\program file\apps\tools dir.
Relative paths are relative to a folder where symlink is, not to symlink itself. So if I have a symlink D:\test\test1\test with relative path ..\test, target is D:\test\test1\ + ..\test = D:\test\test.
You can specify full path to symlink, it doesn't matter, you only should use relative target path.
You're right, I've messed it up a bit too with thomasmo's example, please check this one: d:\program file\apps\tools => ..\exam === d:\program file\apps\exam. You can create it using command mklink /D exam ..\exam from d:\program file\apps\tools dir.
Relative paths are relative to a folder where symlink is, not to symlink itself. So if I have a symlink D:\test\test1\test with relative path ..\test, target is D:\test\test1\ + ..\test = D:\test\test.
sorry, I did a mistake, the cmd line isMVV wrote:petermad,
You can specify full path to symlink, it doesn't matter, you only should use relative target path.
You're right, I've messed it up a bit too with thomasmo's example, please check this one: d:\program file\apps\tools => ..\exam === d:\program file\apps\exam. You can create it using command mklink /D exam ..\exam from d:\program file\apps\tools dir.
Relative paths are relative to a folder where symlink is, not to symlink itself. So if I have a symlink D:\test\test1\test with relative path ..\test, target is D:\test\test1\ + ..\test = D:\test\test.
mklink /d apps ..\apps
type "dir" to look the symbol link in "d:\program file\tool"
"d:\program file\tool\apps" direct to "<SYMLINK> apps [..\apps]"
and the exe file is in "d:\program file\tool\apps\exam\exam.exe"
That helped - now I can reproduce the bug.mklink /d apps ..\apps
type "dir" to look the symbol link in "d:\program file\tool"
"d:\program file\tool\apps" direct to "<SYMLINK> apps [..\apps]"
and the exe file is in "d:\program file\tool\apps\exam\exam.exe"
I can add that with a junction to relative path (mklink /J apps ..\apps) exam.exe can also be executed.if the path is made with "/J" to be a absolute path, it also can be run.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
"/J" make a full path linkpetermad wrote:That helped - now I can reproduce the bug.mklink /d apps ..\apps
type "dir" to look the symbol link in "d:\program file\tool"
"d:\program file\tool\apps" direct to "<SYMLINK> apps [..\apps]"
and the exe file is in "d:\program file\tool\apps\exam\exam.exe"
I can add that with a junction to relative path (mklink /J apps ..\apps) exam.exe can also be executed.if the path is made with "/J" to be a absolute path, it also can be run.
only use "/d" can make a relative path symbold link
Aha - thanks"/J" make a full path link
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50856
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Oh, looks like Microsoft has brought us back a bug which they fixed in IE 10 9.10.9200.16618 and later in ShellExecuteEx function. I already have a workaround for it in TC: I need to resolve the links myself and pass the resolved name to ShellExecuteEx. Thank you Microsoft.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
brought us back ....ghisler(Author) wrote:Oh, looks like Microsoft has brought us back a bug which they fixed in IE 10 9.10.9200.16618 and later in ShellExecuteEx function. I already have a workaround for it in TC: I need to resolve the links myself and pass the resolved name to ShellExecuteEx. Thank you Microsoft.
OMG

thank you for fix the bug in b9, but there still has a little problem, if I use the relative symbold-link path with Environment Variables, just like %COMMANDER_PATH%, in the bar to launch exefile, the "run from" path must use quotation marksghisler(Author) wrote:Oh, looks like Microsoft has brought us back a bug which they fixed in IE 10 9.10.9200.16618 and later in ShellExecuteEx function. I already have a workaround for it in TC: I need to resolve the links myself and pass the resolved name to ShellExecuteEx. Thank you Microsoft.
Example:
COMMANDER_PATH= D:\Program Files\TotalCommander\
symboldlink:
D:\Program Files\TotalCommander\Tools\ => ..\Exam
the bar button set to
cmd: %COMMANDER_PATH%\Tools\exam.exe
path: %COMMANDER_PATH%\Tools\
it "exam.exe" can't run
but set to
cmd: "%COMMANDER_PATH%\Tools\exam.exe"
path: "%COMMANDER_PATH%\Tools"
it "exam.exe" run!
ofcousr if use full path it can run