我爱上了使用 CustomTable
来构建数据驱动的 WiX 安装。我有一个自定义操作,需要在安装过程中对十几个左右的对象执行。我将所有适当的内容放入 CustomTable 中,并通过单个 CustomAction 内的循环进行处理,而不是在 InstallExecute
序列中包含 12 个 ... 条目。
现在我想利用 WiX 提供的功能,例如与 CustomTables 结合使用的 XmlFile
。例如,我在安装过程中需要处理一堆 .config/xml 文件;我不想在 Wix 源中拥有一百万个 ... 元素,而是直接将行添加到 XmlFile
表中。配置 IIS 的情况类似,其中有许多我需要配置的 WebApplication 和 WebVirtualDirs。
看起来这可以通过将“临时行”插入到适当的表中来完成——即XmlFile
或IIsWebVirtualDir
。但我似乎找不到任何关于如何使用 DTF 或其他方式执行此操作的示例。
Bob Arnson 在 ”,不幸的是我找不到任何其他关于如何实现的参考。
I fell in love with CustomTable
to build data-driven WiX installs. I had a custom action that I needed to execute on a dozen or so objects during an installation. Instead of having 12 <Custom Action=
... entries in the InstallExecute
sequence, I put all the appropriate stuff into a CustomTable and process via a loop inside a single CustomAction.
Now I want to leverage the functionality that WiX provides, such as XmlFile
in conjunction with CustomTables. For example, I have a bunch of .config/xml files to process during the install; instead of having a million <XmlFile
... elements in the Wix source I would like to add rows to the XmlFile
table directly. Similar situation for configuring IIS where there are many WebApplication and WebVirtualDirs that I need to configure.
It looks like this can be done by inserting "temporary rows" into the appropriate table-- ie XmlFile
or IIsWebVirtualDir
. But I can't seem to find any examples of how to do this with DTF or otherwise.
Bob Arnson alluded to the fact that this is possible in an old post on joyofsetup that I came upon, unfortunately I can't find any other references to how to implement.
发布评论
评论(1)
您可以通过自定义操作使用安装程序数据库功能。
http://msdn.microsoft。 com/en-us/library/windows/desktop/aa368250(v=VS.85).aspx
有关详细信息和一些示例,请参阅:
http://msdn.microsoft。 com/en-us/library/windows/desktop/aa372021(v=VS.85).aspx
You can use the installer database functions from a custom action.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa368250(v=VS.85).aspx
For details and some examples please see:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa372021(v=VS.85).aspx