如何防止在installshield基本msi项目中运行多个setup.exe实例?

时间:2022-02-23 22:45:24

I have created my application's setup in installshield - basic MSI project... Now when i am installing it, it allows me to run .exe multiple times simultanious... Please let me know, how can i stop it.....

我已经在installshield中创建了我的应用程序设置 - 基本的MSI项目......现在当我安装它时,它允许我多次运行.exe ...请让我知道,我怎么能阻止它.....

1 个解决方案

#1


1  

There is already a safe guard automatically built-into Windows Installer. If two or more of your installs actually try to install only the first one will install. The others will throw a message saying another install is already in progress. This is enforced by the _msiexecute mutex.

Windows Installer中已经安装了一个安全防护装置。如果您的两个或多个安装实际上只尝试安装,那么将安装第一个安装。其他人会抛出一条消息说另一个安装已在进行中。这是由_msiexecute互斥锁强制执行的。

If you want to gate the situation earlier, you'll have to write your own custom actions to create your own custom mutex, tear it down when the install is complete and check for it when starting the install. However, I'd mark this problem as Functions as Designed and move on.

如果您想更早地处理这种情况,则必须编写自己的自定义操作来创建自己的自定义互斥锁,在安装完成时将其拆除并在开始安装时检查它。但是,我将此问题标记为功能设计并继续前进。

#1


1  

There is already a safe guard automatically built-into Windows Installer. If two or more of your installs actually try to install only the first one will install. The others will throw a message saying another install is already in progress. This is enforced by the _msiexecute mutex.

Windows Installer中已经安装了一个安全防护装置。如果您的两个或多个安装实际上只尝试安装,那么将安装第一个安装。其他人会抛出一条消息说另一个安装已在进行中。这是由_msiexecute互斥锁强制执行的。

If you want to gate the situation earlier, you'll have to write your own custom actions to create your own custom mutex, tear it down when the install is complete and check for it when starting the install. However, I'd mark this problem as Functions as Designed and move on.

如果您想更早地处理这种情况,则必须编写自己的自定义操作来创建自己的自定义互斥锁,在安装完成时将其拆除并在开始安装时检查它。但是,我将此问题标记为功能设计并继续前进。