如何使用属性设置安装路径? [英] How to use properties to set the installation path?
问题描述
我想知道如何使用属性设置复制文件的安装路径。因此,请让任何人解释答案。
我知道这可能为时已晚,但有人可能会觉得有用。
可以使用其ID将Wix项目中定义的每个目录元素作为属性进行访问:
例如,如果您有:
< Fragment>
<目录ID = TARGETDIR名称= SourceDir>
<目录ID = ProgramFilesFolder>
<目录ID = INSTALLFOLDER名称=我的目录 />
< / Directory>
< / Directory>
< / Fragment>
您将拥有一个名为INSTALLFOLDER的属性,并且可以从您的自定义操作中访问它。 / p>
在此处看看我的答案,有关如何将参数传递给自定义操作并使用它们的想法。
I want to know how to set the installation path of the copied files by using properties. So, please let anyone explain the answer.
I know this may be too late to answer, but someone may find it useful.
Every Directory element defined in your Wix project can be accessed as a property using its Id:
For example if you have:
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="My Directory" />
</Directory>
</Directory>
</Fragment>
You will have a property named INSTALLFOLDER and you will be able to access it from your custom actions.
Take a look to my answer here, that will give you the idea on how to pass the parameters to your custom action and use them.
这篇关于如何使用属性设置安装路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!