将AppMutex与无声Inno设置一起使用 [英] Using AppMutex with silent Inno Setup

查看:128
本文介绍了将AppMutex与无声Inno设置一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Inno Setup脚本中使用"AppMutex"来确保产品在安装更新时不再运行.基本上可以正常工作.

I'm using "AppMutex" in an Inno Setup script to make sure the product is not running anymore while installing an update. This basically worke fine.

但是,使用"/verysilent"命令参数运行此设置时,会显示一个对话框(尽管非常安静),表明该程序仍在运行,应将其关闭.

But when running this setup with the "/verysilent" command parameter a dialog box is shown (although being very silent) that the program is still running and should be closed.

由于程序本身是自动关闭的,可能只需要花费几秒钟的时间就可以关闭,我只想让Inno Setup等待互斥量被释放,然后开始安装,但在此不向用户显示任何对话框.同时.

As the program itself is closed automatically and this may take only up to few seconds to be closed I just want Inno Setup to wait till the mutex was disposed and then start the installation, but not show any dialog box to the user in the meantime.

那么有没有一种方法可以让Inno Setup在使用"/verysilent"运行时只等到互斥锁被处理掉而又不向用户显示任何对话框呢?

So is there a way to make Inno Setup just wait till the mutex was disposed when running with "/verysilent" and not show any dialog box about that to the user?

在此先感谢您提出任何建议!

Thanks in advance for any suggestions on that!

推荐答案

没有明确的方法来禁止显示此消息.但是,如果您还指定 <命令行的c0> 参数:

There is no explicit way to suppress this message. However, you can suppress all the message boxes if you specify also the /SUPPRESSMSGBOXES parameter for the command line:

setup.exe /VERYSILENT /SUPPRESSMSGBOXES

如果禁止显示所有禁止显示的消息框都不符合您的要求,则可以使用

If suppressing all the suppressible message boxes wouldn't fit to your requirements, you can wait for the mutex to be released (wait for your app. to terminate) by yourself in a loop with the CheckForMutexes function in an event fired before the setup performs this check.

这篇关于将AppMutex与无声Inno设置一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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