使用 WiX 动态更新 app.config 文件

发布于 2024-09-16 22:33:54 字数 278 浏览 1 评论 0 原文

我有一个使用 WiX 构建的 msi。安装程序的一部分会收集一些设置,这些设置将输入到已安装应用程序的 app.config 文件中。

现在,如果我为 wxs 文件中将要更改的每个设置定义 ,它就可以正常工作。

现在我的问题是:有没有一种方法可以动态创建这个 util:XmlFile 标记(例如,从自定义操作),这样我就不必将其硬编码到 wxs 中来更新 app.config 的每个设置。

I have an msi built using WiX. Part of the installer collects some settings that will be entered into the app.config file of the installed app.

Now it works fine if I define <util:XmlFile ... for each setting that is going to change in the wxs file.

Now my question is this: is there a way I can dynamically create this util:XmlFile tag (e.g. from a custom action) so that I don't have to hard code it in to the wxs for each setting the app.config to update.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紙鸢 2024-09-23 22:33:54

它是如何进行采集的呢?您正在执行 AppSearch 并填充属性吗?您可以在 XmlFile 元素中使用 [PROPERTY] 吗?注意 [PROP] 是 MSI 中 PROP 的值。

How does it do the collection? Are you doing an AppSearch and populating properties? Can you just use the [PROPERTY] in your XmlFile element? Note [PROP] is the value of PROP in MSI speak.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文