Walt D
Walt D

Reputation: 4731

How can I create a symbolic link with Inno Setup?

Using Inno Setup, is there any way to create a symbolic link from one directory in my {app} folder to another? For example:

{app}\MySymbolicLink => {app}\MyLinkedFolder

Upvotes: 2

Views: 2070

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202642

The easiest is to invoke the mklink:

[Run]
Filename: "{cmd}"; \
    Parameters: "/C mklink /D ""{app}\MySymbolicLink"" ""{app}\MyLinkedFolder"""

You can also call CreateSymbolicLink from [Code] section.

Similarly to how CreateHardLink is called in Create a hardlink with Inno Setup.

Upvotes: 2

Related Questions