gpt4 book ai didi

c# - 如何检测正在运行的 MSI 安装

转载 作者:太空狗 更新时间:2023-10-30 01:33:15 28 4
gpt4 key购买 nike

<分区>

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

  • 检查注册表项:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress
  • 使用 Windows Installer API 函数 MSIInstallProduct 和一个虚拟文件,然后返回特定的错误代码。

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

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com