How can I create a symbolic link with Inno Setup?

风流意气都作罢 提交于 2021-02-08 08:06:02

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/48027881/how-can-i-create-a-symbolic-link-with-inno-setup

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!