Windows symlink to executable - does not open by double click

5,566

Solution 1

As a partial solution, in case both the target and the link are on the same disk, you can use a hard link which works fine with double click:

mklink /H Test.exe C:\Path\to\source.exe

If you have to use symbolic link, I don't know what to do, however, I do know what NOT to do: don't try to associate your link with explorer.exe and the like in that "Open with..." dialog. I have just tried it and spent half an hour fixing my PC afterwards.

Solution 2

Windows symlink to executable does not open when double clicking

A recent Windows 7 Update KB3039066 broke symbolic links in Windows Explorer and other programs that use the services provided by the Windows shell.


Fix

The problem is solved by uninstalling the following update on both the file server and a client computer: KB3039066.

After uninstalling it you must restart the PC.

Source: Symbolic link type changed


Workarounds

  1. Use a hard link (mklink /h)
  2. System restore to an earlier date.

Same problem here. And yeah, I have installed something: the latest Windows update. I know that's the cause, because I noticed the problem on one computer. Then checked on a different one, and no problem there. I immediately applied Windows update to the second machine, and... bam! Explorer no longer resolves symbolic links.

...

With a System Restore to a earlier date, I was not able to duplicate this issue, thus I can positively confirm that there currently stands a bug with regards to Symbolic Link behaviour in Windows Explorer, introduced after a recent Windows 7 update.

As a work-around for now: if you would like to navigate to a linked file through Explorer, and you require a programme to access that link, consider using a Hardlink.

Source Windows 7: Windows Explorer does not follow Symbolic Links


Further Reading

Solution 3

David’s answer is not the whole solution for EXE files. Removing update KB3039066 does fix the thumbnail images for symlinks.

However when you double-click the link in Windows Explorer, the link cannot be opened, and you receive an error message that resembles the following:

The specified path does not exist.

This is fixed by installing update KB3009980. Thanks go to this forum post.

Note you can download the hotfix here if you do not want to have Microsoft email it to you.

Ironically, KB3009980 breaks the “Extra Large Icons” and “Large Icons” for symlinks of JPG files.

Share:
5,566

Related videos on Youtube

Mikaso
Author by

Mikaso

Updated on September 18, 2022

Comments

  • Mikaso
    Mikaso almost 2 years

    On Windows 7 I created a symbolic link to an executable using:

    mklink Test.exe C:\Path\to\source.exe
    

    But when I try to run it by double clicking on it, i get the "open with" dialog.

    Running it from a command window works. The path is right.

    Is there any way a symbolic link will be treated like the file it points to (e.g. executable or batch scripts)?

    • Mikaso
      Mikaso over 9 years
      I see, there are similar symptoms, but no real answer howto actually run a link to an executable by double-clicking in the windows explorer. I would appreciate if no external programs are needed to configure windows to do the job it should.
  • Mikaso
    Mikaso over 9 years
    That's the solution. The source of the link targets is on the same disk, so this works for me. Thanks!