其他安装正在进行中 挂着我的 Wix 安装 [英] Other installation In Progress Hanging my Wix Install

查看:33
本文介绍了其他安装正在进行中 挂着我的 Wix 安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个 WIX 安装程序引导程序(在 msipackage 上带有 DisplayInternalUI="yes"),但是当同时发生其他安装时它会挂起.

如果我使用 msiexec 自行运行 MSI 文件,则会出现 Windows 安装程序错误另一个安装正在进行中" 消息(即 1500 MSI 错误消息) - 我认为这是挂起我的安装.

因此,我正在做的是看看我是否可以在用户按下安装按钮之后(即在 ProgressDlg 之前)锁定 _MSIExecute mutex.如果我可以锁定互斥锁,那么就没有其他正在进行的安装 - 因此继续安装(即执行阶段)是安全的.如果没有,安装程序会显示一个取消按钮(并且没有其他按钮) - 因此安装将不会继续.

我想知道是否有办法防止 另一个安装正在进行中" 错误消息(和其他消息)挂起安装程序.

解决方案

来自 serverfault.com 的简单解释

<小时>

没有 MSI 并发:为什么会有其他安装同时"发生——或者换句话说,同时发生?当涉及到 WiX Burn 引导程序时,我并没有受过太多的训练,但我想知道有问题的 MSI 是否包含启动其他 MSI 安装的任何自定义操作?这对于 MSI 包是不允许的.您不能同时运行两个并发 InstallExecuteSequences.因此,您无法从 InstallExecuteSequence 中启动 MSI.有些人试图从 InstallUISequence 开始安装,这也是非常不可取的,原因有很多 - 一方面,当安装程序以静默模式运行时,它根本不会运行.如果您为自定义操作设置检查退出代码以及诸如此类的东西,我还怀疑海拔可能存在问题,以及意外设置失败.它总是置换.要记住的基本经验法则是:自定义操作绝不能启动其他 MSI 安装.WiX Burn bootstrapper 基本上专门用于允许您按顺序运行 MSI 文件 - 而不是同时运行 - 但它也更多:它是一个组合的引导程序、链接器、下载器等......>

Mutex:强词,但如果你知道什么对你有好处,你就会远离 MSI 互斥锁.救你自己!:-).MSI 是一项反击技术,如果您参加战斗,您将真正与风车战斗.这就是我能说的警告你.除非您遵循基本规则,否则实际上是不可能处理的,在这种情况下,一次运行一个安装程序.WiX 人员可以处理它 - 留给他们 - 并使用他们的工具属性(WiX Burn).虽然我不清楚技术细节,但它们肯定会实现功能来完全按照您的描述执行(检查系统是否已准备好安装).

挂起安装:您的系统上也可能存在挂起的安装,需要先撤消才能安装 MSI 文件.您可以尝试安装另一个 MSI 文件并查看它是否正常运行吗?我不是 100% 确定这是正确的链接,但您也可以尝试:修复阻止安装或删除程序的问题.

I am creating a WIX installer bootstrapper (with DisplayInternalUI="yes" on the msipackage), but it hangs when there are other installations occurring at the same time.

If i run the MSI file on its own using msiexec I get a windows installer error "Another installation is in progress" message (i.e 1500 MSI error message) - and I presume this is hanging my install.

Therefore what I am doing is seeing if I can lock the _MSIExecute mutex just after the user presses the Install button (i.e. before the ProgressDlg). If I can lock the Mutex then there are no other installs in progress - therefore it is safe to proceed with the install (i.e. the execution phase) . If not the installer shows a cancel button (and no other buttons) - so the install will not proceed.

I was wondering if there was a way of preventing the "Another installation is in progress" error message (and other messages) from hanging the installer.

解决方案

Simpler explanation from serverfault.com


No MSI Concurrency: Why are there other installations happening "at the same time" - or in other words concurrently? I am not too potty-trained when it comes to WiX Burn bootstrappers, but I am wondering if the MSI in question contains any custom actions which kicks off other MSI installs? This is not allowed for MSI packages. You can not have two concurrent InstallExecuteSequences running at the same time. Hence you can not kick off an MSI from within an InstallExecuteSequence. Some people try to kick off installs from the InstallUISequence, which is also very unadvisable for many reasons - for one thing it won't run at all when the setup is run in silent mode. I also suspect potential issues with elevation, and unexpected setup failure if you set check exit code for the custom action, and that kind of stuff. It always permutes. The basic rule of thumb to remember is: Custom actions must never launch other MSI installations. The WiX Burn bootstrapper basically specifically exists to allow you to run MSI files in sequence - and not concurrently - but it is also more: it is a combined bootstrapper, chainer, downloader, etc...

Mutex: Strong words, but if you know what is good for you, you will stay away from MSI mutexes. Save yourself! :-). MSI is a technology which fights back, and you will be fighting windmills for real if you take the fight. That is all I can say to warn you. It really is impossible to deal with unless you follow the basic rules, which in this case is one installer running at a time. The WiX guys could deal with it though - leave it to them - and use their tool propery (WiX Burn). Though the technical details are unclear to me, they will certainly have features implemented to do exactly what you describe (check if the system is ready for installation).

Suspended Installation: It is also possible that there is a suspended installation on your system that needs to be undone before you can install MSI files at all. Can you try to install another MSI file and see if it runs correctly? I am not 100% sure this is the right link, but you can also try: Fix problems that block programs from being installed or removed.

这篇关于其他安装正在进行中 挂着我的 Wix 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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