Windows – How to Fix Symlink to Executable Not Opening by Double Click

double clicklinkssymbolic-linkwindows

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)?

Best Answer

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.

Related Question