通过使用 copyfile 元素文件无法绑定到 msi 包中
我正在使用wix 3.0。我有一个文件夹名称“images”。所以我想将图像中的所有文件复制到msi包中。当我复制所有文件并将msi安装到另一台电脑时,它没有绑定图像。当我使用简单的文件元素时,文件绑定到 msi 包。那我该怎么办,
尽快回复我
谢谢 萨米尔
i am using wix 3.0.i have a folder name "images".so i want to copy all the files from images into msi package.when i copy all the file and install msi to another PC then it did not bind the images. And when i use simple File Element then the files bind to msi package. so what should i do,
Reply me soon
Thanking You
Samir
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然,您想要创建一个可以生成屏幕保护程序安装程序的应用程序,其中包括用户选择的许多图像文件 - 一种专门用于创建屏幕保护程序安装程序的专用 InstallShield 应用程序。
我首先创建一个模板 MSI 文件(使用 wix
或其他东西),大部分
工作。您不知道用户稍后将选择哪些文件,因此添加 ID 为“UserSelectedFiles”的占位符组件。分发这个
包含您的应用程序的模板 MSI 文件。
然后,当用户想要生成一个
新的安装程序,首先复制
模板。编辑复制的 msi,以便它也安装用户选择的文件。您可以使用 .NET 类来完成此操作
你可以在“部署
工具基础”API。这是wix附带的一组程序集;看看
C:\program files\Windows Installer
。XML v3\sdk
我只将 DTF API 用于一些简单的事情,例如这个示例,它计算 MSI 中的文件表条目:
您的情况会更复杂一些。您可能需要
包含您的类的图像文件
找到在
Microsoft.Deployment.Compression.Cab
命名空间。
使用
Database.Merge
将产品
要了解 MSI 文件的内容以及如何编辑它,我建议您首先尝试一下 Orca 和 msidb 工具。
Apparently you want to create an application that can generate a screensaver installer that includes a number of image files selected by the user — a sort of specialized InstallShield application just for creating screensavers installers.
I would first create a template MSI file (with wix
or something else) that does most of
the work. You don't know which files the user is going to select later on, so add a placeholder component with the ID "UserSelectedFiles". Distribute this
template MSI file with your application.
Then, when the user wants to generate a
new installer, start by copying the
template. Edit the copied msi so that it also installs the user selected files. You can do this with the .NET classes
you can find in the "deployment
tools foundation" API. This is a set of assemblies that come with wix; take a look at
C:\program files\Windows Installer
.XML v3\sdk
I have only used the DTF API for some simple stuff, like this example which counts the File table entries in the MSI:
Your case will be a bit more complicated. You will probably have to
the image files with the classes you
find in the
Microsoft.Deployment.Compression.Cab
namespace.
with
Database.Merge
of the MSI
To get an idea of the content of an MSI file and how it can be edited, I recommend you first play around a bit with the orca and msidb tools.