如何使用 WIX CopyFile 元素将更改/修复时的文件复制到系统文件夹而不将其安装到目标?
我遇到一个问题,该问题与使用 WIX 进行 msi 设置时在更改/修复时执行 CopyFile 相关。
我有一个功能,它有一个组件,可以将文件从源文件夹复制/移动到用户系统内某个位置已存在的文件夹。它不是我的应用程序的文件夹。我只是移动这个文件,而不是将其安装到目标。如果我使用完整的设置来安装此功能,则该功能可以正常工作。但是,在初始安装时,我选择不安装此功能,然后尝试在“更改”期间安装它,该功能内的所有其他自定义操作/组件都会执行/安装(CopyFile 组件除外)。这对我的设置至关重要,如果不复制它,我的设置将失败。
只是想知道是否有人找到类似问题的解决方案或曾经遇到过类似问题?
I have a problem which is related to the execution of CopyFile on change/repair when using WIX to make a msi setup.
I have a feature which has a component which copies/moves a file from the source folder to a folder already present somwhere inside a users system. It is not the folder of my application. I am only moving this file and not installing it to the the target. This feature works fine if I install it using a complete setup. But when on initial install I chose not to install this feature and then try to install it during a " change " all other custom actions/components inside the feature are executed/installed except for the CopyFile component. This is critical to my setup and if it does not get copied my setup will fail.
Just wondering if anyone found a solution to a similar problem or ever came across a similar issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
包含 CopyFile 操作的组件配置不正确。它应该有一个实际的文件或注册表项作为关键路径。
虽然Windows Installer使用组件来管理资源,但组件密钥路径是决定组件是否安装的主要因素。
因此,没有资源作为关键路径的组件将永远不会被安装,并且它包含的 CopyFile 操作也永远不会被执行。
The component which contains the CopyFile operation is configured incorrectly. It should have an actual file or registry entry as a key path.
Although Windows Installer uses components to manage resources, the component key path is main factor which decides if the component is installed or not.
So a component without a resource as a key path will never be installed and the CopyFile operation it contains will never be executed.