Install two MSI and one EXE with an API Call.

huangapple go评论62阅读模式
英文:

Install two MSI and one EXE with an api Call

问题

我刚刚开始学习wixtoolset(https://wixtoolset.org/)。

我的需求是在不同的机器上安装供应商提供的两个msi文件和一个exe文件。

每台机器都将有其特定的配置,所以我的想法是通过API调用下载这个配置。

我该如何组织这个项目?
我已经阅读了安装两个msi文件需要使用bundle,但我找不到如何使用customaction的信息。

我能否不使用bundle而直接调用msi安装程序?

英文:

I just started studying wixtoolset (https://wixtoolset.org/).

My need would be to install two msi files given by our supplier and one exe file on different machines.

Each machine will have its specific configuration, so my idea is to download this configuration via an API call.

How can I structure the project?
I've read that to install two msi I need to use a bundle but I couldn't find information on how to use a customaction.

Can I not use a bundle and call the msi installer?

答案1

得分: 0

您说得对。要安装多个MSI文件,您需要创建一个捆绑包(单个.exe文件),并使用"Chain"元素包含每个单独的包。一些示例在这里:https://wixtoolset.org/docs/tools/burn/#chain

至于如何使用自定义操作:

当安装包的开发人员需要实现默认情况下未提供的场景时,Windows Installer自定义操作非常有用。例如,验证用户输入,加密用户输入,或在安装UI上显示自定义进度信息(剩余时间)。
https://seshuk.com/2021-07-18-wix-customaction-admin/

官方自定义操作文档(Wix4)https://wixtoolset.org/docs/tools/wixext/

回答您的问题,您应该能够通过自定义操作进行API调用,因为它只是一个单独的C#/C ++或VB项目。然后,在捆绑包中,您可以配置自定义操作何时/如何执行,以及一些附加逻辑。

至于UI,您可以使用WixStandardBootstrapperApplication,它提供了适用于大多数用例的主题。https://wixtoolset.org/docs/tools/burn/wixstdba/

或者,如果您需要为捆绑包创建自定义页面,您可以自行构建自己的页面(使用自定义操作来处理任何自定义用户输入等),并定义自己的安装程序序列。

英文:

You're right. To install multiple MSI files, you create a bundle (single .exe file) and use the "Chain" element to include each individual package. Some examples here:
https://wixtoolset.org/docs/tools/burn/#chain

As for how custom actions are used:

> Windows Installer custom actions are useful when the developers of an installation package needs implement scenarios that are not provided by default. For example validating user input, encrypting user input or showing custom progress information (time remaining) on the installation UI.
https://seshuk.com/2021-07-18-wix-customaction-admin/

Official documentation for custom actions (Wix4) https://wixtoolset.org/docs/tools/wixext/

To answer your question, you should be able to make API calls through a custom action, as it is just a separate C#/C++ or VB project. Then, in your bundle you can configure when/how the custom action is executed, plus some additional logic.

As for a UI, you can either use the WixStandardBootstrapperApplication
which offers themes for most use cases.
https://wixtoolset.org/docs/tools/burn/wixstdba/

Or, if you need custom pages for your bundle, you can build your own (using custom actions to handle any custom user input etc.) and define your own installer sequence.

huangapple
  • 本文由 发表于 2023年3月31日 21:29:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/75899101.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定