Wix:CustomAction之后如何设置属性? 我需要自定义操作吗?

发布于 2024-07-25 07:47:46 字数 475 浏览 4 评论 0原文

我想使用 Wix 安装程序安装插件。 在计算机上,可以安装更多版本的应用程序,因此用户必须决定应该使用哪个版本。 应用程序以这种方式写入注册表:

HKLM\Software\Company\Application\Version ....

这意味着 HKLM\Software\Company\Application 项没有直接值,我必须 询问其子项在 C# 中使用以下命令执行了什么操作:RegistryKey.GetSubKeyNames。

问题 1:

有没有办法在不使用 CustomAction 的情况下读取这些子项名称?

我没有发现这种可能性,这就是我使用自定义操作来完成此操作的原因。

问题 2:

但是如何将 CustomAction 中找到的结果设置为 wxs 中的属性? 是否可以?

如果你能帮助我,我会很高兴...

再见,Ivo

I want to install a plugin with the Wix Setup. On the computer, there could be installed more versions of the application, so the user has to decide, which version should be used.
The applications are written in the registry in this way:

HKLM\Software\Company\Application\Version ....

That meas that the key HKLM\Software\Company\Application has no direct values and i have to
ask for its children what is done in C# with: RegistryKey.GetSubKeyNames.

QUESTION 1:

Is there any way to read these subkey names without CustomAction?

I hadn't found that possibility and that's why I've done it with Custom action.

QUESTION 2:

But how can I set the results found in the CustomAction as property in wxs? Is it possible?

If you can help me, I would be very happy...

Bye, Ivo

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

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

发布评论

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

评论(1

缺⑴份安定 2024-08-01 07:47:46
  1. 无法使用 Windows 安装(或 Wix)枚举键,您只能搜索直接键路径。
  2. 您可以编写非常简单的自定义操作(使用 DTF)来执行此特殊搜索。
  3. 以下示例演示了 DTF 的完整使用(使用自定义操作列出 IIS 上的可用网站)它展示了如何将数据从自定义操作传递回安装程序以及如何使用 UI 显示数据。
  1. You can't enumerate keys using windows install (or Wix) you can only search a direct key path.
  2. You can write pretty simple custom action (using DTF) that will do this special search.
  3. Here is a sample that demonstrate a full use of DTF (Using a Custom Action to list available web sites on IIS) it shows how to pass data from the custom action back to the installer and how to display the data on using UI.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文