以下不编译,但我怎样才能获得等效的功能[MYDIR]
?
<Component Id="MyComponent" Guid="MY_GUID" KeyPath="yes" Directory="[MYDIR]">
<File Source="MyFile.dll" Name="MyFile.dll"/>
</Component>
(我试图将文件MyFile.dll
放入一个目录,该目录的路径在安装程序实际运行时确定。)
该Directory
属性必须对应<Directory>
于安装程序中某处的标记。您可以将该目录设置为在运行时设置的属性的值。一个很好的例子是使用 WixUI_InstallDir 询问用户他们想在哪里安装应用程序。
这是一个使用示例: https ://wixtoolset.org//documentation/manual/v3/wixui/dialog_reference/wixui_installdir.html