如何防止运行在 installshield basic msi 项目中创建的 setup.exe 的多个实例?
我已经在 installshield - 基本 MSI 项目中创建了应用程序的设置... 现在,当我安装它时,它允许我同时运行 .exe 多次...... 请告诉我,我该如何阻止它......
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.....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Windows Installer 中已经自动内置了一个安全防护装置。如果您的两个或多个安装实际上尝试安装,则只会安装第一个。其他人会抛出一条消息,表示另一个安装已经在进行中。这是由 _msiexecute 互斥体强制执行的。
如果您想更早地控制这种情况,则必须编写自己的自定义操作来创建自己的自定义互斥体,在安装完成时将其拆除,并在开始安装时检查它。不过,我会将此问题标记为“设计的功能”并继续。
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.
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.