blog: the truth about symbolic links

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

blog: the truth about symbolic links

Post by nikos »

here's the comment area for today's blog post found at
http://zabkat.com/blog/20Feb11-symbolic-links.htm

can someone confirm that symbolic links to remote UNC folders work or not?
Tuxman
Platinum Member
Platinum Member
Posts: 1683
Joined: 2009 Aug 19, 07:49

Post by Tuxman »

I've been using the Hardlink Shell Extension for a couple of years now. I like the context menu options. :)
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
RightPaddock
Gold Member
Gold Member
Posts: 428
Joined: 2011 Jan 23, 18:58
Location: Sydney AU

Post by RightPaddock »

I too use Hardlink Shell Extension (LSE).  I use junctions and symlinks to folders & files in Win 7.  

I only get the "the specified path does not exist" message if the symlink targets an executable file. For other file types, a click will open the file in its default program - e.g. txt files in Notepad, docx files in Word 2007 etc.  

The .exe misbehaviour occurs irrespective of how the symlink is created, i.e. MKLink, x2 or LSE.
User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

so it was just by accident that I stumbled on the bug with EXE files, what are the chances of that? I see that symbolic links work on TXT files...

did you try to create a symbolic link to a network location with UNC path? (file or folder)
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1254
Joined: 2005 Oct 16, 19:09

Post by FrizzleFry »

I am able to create a symbolic like to a folder on another PC in my home network... the shortcut to column in x2 is not populated with the UNC location and the attributes show a J... but the link properties page provided by LSE does show it as a sym link and shows the right UNC path... I created sym links with both LSE and x2 paste special (I had to use Window/Administrator).
User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

does the network link work then?
User avatar
Thracx
Silver Member
Silver Member
Posts: 263
Joined: 2004 Nov 05, 19:33

Post by Thracx »

nikos wrote:does the network link work then?
Yes, they work great.  I make great use of SymLinks all over my network and various filesystems.  Support pre-Win7 wasn't entirely all there (I used Junctions in WinXP sometimes but as we know, you cannot link to a UNC path), and I didn't use Vista so I can't speak to that era.  But for the past year with Win7, I've used them to great effect, including at work where we link to Solaris/Unix shares so my fellow developers don't get confused by 'non-Windows' stuff ;-)

Also note that you can mount storage devices directly to a folder, avoiding the need for using a drive letter - and this functionality also utilizes Reparse Points, the same thing that Junction/SymLinks use.  I use this to avoid having tons of drives cluttering up My Computer for end-users, like my parents or friends, when all I want to do is utilize the space or redundancy for something where there's already a standard filesystem location for.

I've spent a good deal of time with these creatures, feel free to PM me if you'd like some help understanding them.  I know it took me quite a while to get a true understanding of how they work since they are not designed for end-users and therefor the documentation is poor or fragmented.
-Thracx

"Man wants to know, and when he ceases to do so, he is no longer a man."
-Fridtjof Nansen
User avatar
Thracx
Silver Member
Silver Member
Posts: 263
Joined: 2004 Nov 05, 19:33

Post by Thracx »

nikos wrote:...the bug with EXE files....? I see that symbolic links work on TXT files...
You cannot use file SymLinks with EXE files - it just doesn't work.  You get a "The specified path does not exist." message if you try.  This is probably a bug, but could also be somewhat intentional since it has various negative security implications.  The problem is only with 'executing' - you can actually use Notepad/Editor² to 'read' the contents of the EXE hard link... you just can't tell the OS to 'execute' the file. :?

You can use a file Hard Link with EXE files, it works great but since it's not a SymLink, the link and link target must be on the same volume (i.e. C:\MyLink.exe -> C:\MyApp.exe works but C:\MyLink.exe -> D:\MyApp.exe will throw an error if you try creating it).
-Thracx

"Man wants to know, and when he ceases to do so, he is no longer a man."
-Fridtjof Nansen
User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

ok then i must rephrase the article, symbolic links are awkward but not completely rubbish :)
User avatar
Thracx
Silver Member
Silver Member
Posts: 263
Joined: 2004 Nov 05, 19:33

Post by Thracx »

nikos wrote:ok then i must rephrase the article, symbolic links are awkward but not completely rubbish :)
Glad to hear it ;-)

It's an unfortunate side affect of backwards compatibility and incremental development.  I'm sure they would love to redesign a perfectly behaving feature from scratch and remove the old features, but as a dev I'm sure you can just imagine just how many people would complain if they did such a thing!
-Thracx

"Man wants to know, and when he ceases to do so, he is no longer a man."
-Fridtjof Nansen
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1254
Joined: 2005 Oct 16, 19:09

Post by FrizzleFry »

nikos wrote:does the network link work then?
Yes, sym links to network folders work fine... but the 'shortcut to' column in x2 does not... it's blank for sym links.
User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

the shortcut to column works for me (for local symlinks), so yours must be broken for network targets only? What if you run as administrator?

ps bug confirmed