Relative Symbolic Links to Executables

Hey,

Let me start this off by saying that this is a bug with how Windows handles symbolic links, not Directory Opus. I'm just wondering if there were any existing solutions that anyone knew of, or if this has been addressed. (Tried searching but the amount of topics pertaining to "symbolic links" got a bit overwhelming)

On Windows Vista/Windows 7, if you attempt to run a symbolic link that resolves to a relative path, Explorer will always throw an error telling you that the file doesn't exist.

As an example, I have a script that automates the process of checking the SysInternals website for updates, updates a subtree of folders containing a cache of downloaded packages, and, if need be, symbolic links an executable in the root directory to the appropriate executable in the subtree.

Now, when I attempt to run this program from Directory Opus or Explorer, I get the following:

(old external image link no longer works)

But when I run it from the command line, it works fine:

(old external image link no longer works)

I'd use hard links, but since hard links would track the actual target of the link, I'd have to delete the link in the root folder and relink it every time a file updates. (Which is an option - I'd just like to avoid it if possible) I also actually tried using an absolute symbolic link, but that didn't appear to work, either.

Hmm, interesting - I'd never noticed that before.

I wonder if it's not a bug per-se but a security measure. I'm not really sure exactly why it would be a security measure, but then Microsoft often do strange things in the name of security :slight_smile:

We could probably work around it in Opus by dereferencing the link first and running the real program - I'll add it to the list.