Windows 安装程序可以同时安装两个 msi 文件吗? [英] Can Windows installer install two msi files at the same time?

查看:32
本文介绍了Windows 安装程序可以同时安装两个 msi 文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WIX制作的msi安装包,安装后会自动安装IIS Express 10.0.

I have a msi installation package made by WIX, which automatically installs IIS Express 10.0 after the installation.

<Binary Id="myCustomActionsDLL" SourceFile="$(var.CustomAction.TargetDir)CustomAction.CA.dll" />
<CustomAction Id="CheckIISExpressStatus" BinaryKey="myCustomActionsDLL" DllEntry="CheckIISExpressStatus" Execute="immediate" Return="check" Impersonate="yes"/>
<CustomAction Id="InstallIISExpress" BinaryKey="myCustomActionsDLL" DllEntry="InstallIISExpress" Execute="immediate" Return="ignore" Impersonate="yes" />
<InstallExecuteSequence>
  <Custom Action="CheckIISExpressStatus" After="InstallFinalize" Overridable="yes">NOT Installed</Custom>
  <Custom Action="InstallIISExpress" After="CheckIISExpressStatus" Overridable="yes">NOT Installed AND IS_INSTALL_IISEXPRESS="1"</Custom>
</InstallExecuteSequence>

在 InstallIISExpress 操作中,我调用 bat 来执行安装.

In the InstallIISExpress action, I call bat to perform the installation.

msiexec /i iisexpress_amd64_en-US.msi /qb 

但是在执行过程中,Windows Installer提示错误:

But during execution, the Windows Installer prompts the error:

正在安装其他程序,请等待安装完成,然后再次尝试安装软件.

我可以设置什么参数让msi同时安装两个msi?

What parameters can I set to allow msi to install two msi at the same time?

推荐答案

您不得从主 MSI 中的自定义操作运行其他设置.相反您应该使用引导程序按顺序运行 MSI 文件,例如 WiX 的刻录功能.

You must not run other setups from a custom action within your main MSI. Instead you should run MSI files in sequence using a bootstrapper such as WiX's Burn feature.

已经晚了.我曾试图对此进行适当的解释,也许看看对您是否有意义:Wix - 如何在没有 UI 的情况下运行/安装应用程序.

It is late. I tried to write a proper explanation of this at one point, maybe see if it makes sense to you: Wix - How to run/install application without UI.

总结:从 MSI 中的自定义操作运行旧版 setup.exe 文件是不可靠的,并且运行 MSI 文件 - 无论是直接运行还是嵌入在 setup.exe 中都肯定无法运行,因为 Windows Installer 不允许并发 MSI安装顺序.InstallExecuteSequence 运行时设置互斥锁,同时不能运行其他 InstallExecuteSequence它是有效的.禁止同时安装 MSI 并且技术上不可能.

To summarize: running legacy setup.exe files from a custom action in your MSI will not be reliable, and running MSI files - whether directly or embedded in a setup.exe will positively not work because Windows Installer does not allow concurrent MSI installation sequences. A mutex is set when InstallExecuteSequence runs, and no other InstallExecuteSequence can be run while it is in effect. Concurrent MSI installations are forbidden and technically impossible.

这篇关于Windows 安装程序可以同时安装两个 msi 文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆