Inno Setup Exec不等待InstallShield卸载完成 [英] Inno Setup Exec doesn't wait for InstallShield uninstallation to complete

查看:139
本文介绍了Inno Setup Exec不等待InstallShield卸载完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装之前尝试使用卸载字符串卸载软件(并在InitializeSetup中使用Exec运行该软件),它不会等待卸载完成,而是进入Inno中的下一步安装设置.

Trying to uninstall a software using the uninstall string (and running that with Exec in InitializeSetup) before installation, it doesn't wait for the un-installation to complete but proceeds to the next step of installation in Inno Setup.

我正在使用以下代码和我试图在Installshield产品中卸载的软件:

I am using the following code and the software I am trying to un-install in an Installshield product:

Exec(
  ExpandConstant('{pf}\InstallShield Installation Information\{{XXX8X88X-XX8X-88X8-X8XX-88X888X88888}\setup.exe'),
  '-s -runfromtemp -l0x0004 -removeonly -remove', '',
  SW_SHOW, ewWaitUntilTerminated, ReturnCode)

推荐答案

setup.exe最有可能执行实际卸载的子过程并退出.因此,Inno Setup似乎不等待该过程完成.这是一种常见的行为,因为卸载程序需要删除自身,如果它仍在运行,则它无法执行的操作.因此,它会在一个临时文件夹中创建其自身(或另一个可执行文件)的副本,并从该文件夹中(重新)执行.

The setup.exe most probably executes a subprocess for an actual uninstallation and exits itself. So Inno Setup seemingly does not wait for the process to finish. This is a common behavior, as the uninstaller needs to delete itself, what it cannot do, if it still running. So it creates a copy of itself (or another executable) in a temporary folder and (re)executes from there.

根据 InstallShield文档,您可以尝试添加/w/Clone_wait切换到命令行:

As per InstallShield documentation, you can try adding /w or /Clone_wait switches to the command-line:

/w ...对于Basic MSI项目,/w选项强制Setup.exe 等到安装完成才退出.

/w ... For a Basic MSI project, the /w option forces Setup.exe to wait until the installation is complete before exiting.

/Clone_wait ...此参数指示原始设置应等待克隆的安装过程完成,然后退出.

/Clone_wait ... This parameter indicates that the original setup should wait for the cloned setup process to complete before exiting.

这篇关于Inno Setup Exec不等待InstallShield卸载完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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