如何检测正在运行的 MSI 安装 [英] How to detect a running MSI Installation

查看:29
本文介绍了如何检测正在运行的 MSI 安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来检测 Windows Installer 安装是否已在进行中.到目前为止,我发现的是:

I'm looking for a way to detect if a Windows Installer installation is already in progress. What I've found out so far is:

  • 检查注册表项:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress
  • 使用带有虚拟文件的 Windows Installer API 函数 MSIInstallProduct,然后返回特定的错误代码.
  • Checking the Registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress
  • Using the Windows Installer API function MSIInstallProduct with a dummy file which then would return the specific error code.

有人知道更聪明的解决方案吗?

Does anybody know a smarter solution?

推荐答案

同:

检查 Windows 安装程序互斥锁的可用性

还有这个:

http://blogs.msdn.com/b/heaths/archive/2006/01/23/516454.aspx

问题 1:

http://blogs.msdn.com/b/windows_installer_team/archive/2005/11/09/487559.aspx

这篇关于如何检测正在运行的 MSI 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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