简体   繁体   English

WiX:将文件从本地文件夹复制到安装文件夹

[英]WiX: Copy a file from local folder to installation folder

I'm using a WiX setup project to build an MSI package. 我正在使用WiX安装项目来构建MSI程序包。

I want the MSI, to do a copy of the given file during the installation to the installation folder from the one, where the .msi file is running from. 我希望MSI在安装过程中将给定文件的副本从运行.msi文件的文件夹复制到安装文件夹。

I read on WiX a bit, and what I found is the <CopyFile... /> element supposed to do that. 我在WiX上阅读了一下,发现的是<CopyFile... />元素应该可以做到这一点。

Appreciate your help. 感谢您的帮助。

Actually I've figured out what the issue is. 实际上,我已经弄清楚了问题所在。 The problem is that the SourceDirectory of the CopyFile element supposed to point to the Directory tag id. 问题在于,CopyFile元素的SourceDirectory应该指向目录标签ID。 Instead, I've used SourceProperty attribute of the CopyFlie tag, and also defined a Property separately, which made the use of the CopyFile element correct. 相反,我使用了CopyFlie标记的SourceProperty属性,并且还单独定义了一个Property,这使CopyFile元素的使用正确。 So it worked. 这样就行了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM