Inno Setup Exec 不等待 InstallShield 卸载完成
Inno Setup Exec doesn't wait for InstallShield uninstallation to complete
尝试在安装前使用卸载字符串(和 运行 InitializeSetup
中的 Exec
卸载软件,它不会等待卸载完成但会继续 Inno Setup 中的下一步安装。
我正在使用以下代码和我试图在 Installshield 产品中卸载的软件:
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 似乎不会等待进程完成。这是一个常见的行为,因为卸载程序需要删除自己,如果它仍然 运行,它不能做什么。因此它会在一个临时文件夹中创建自身(或另一个可执行文件)的副本并从那里(重新)执行。
根据 InstallShield documentation,您可以尝试将 /w
或 /Clone_wait
开关添加到命令行:
/w
... For a Basic MSI project, the /w
option forces Setup.exe
to wait until the installation is complete before exiting.
/Clone_wait
... This parameter indicates that the original setup should wait for the cloned setup process to complete before exiting.
尝试在安装前使用卸载字符串(和 运行 InitializeSetup
中的 Exec
卸载软件,它不会等待卸载完成但会继续 Inno Setup 中的下一步安装。
我正在使用以下代码和我试图在 Installshield 产品中卸载的软件:
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 似乎不会等待进程完成。这是一个常见的行为,因为卸载程序需要删除自己,如果它仍然 运行,它不能做什么。因此它会在一个临时文件夹中创建自身(或另一个可执行文件)的副本并从那里(重新)执行。
根据 InstallShield documentation,您可以尝试将 /w
或 /Clone_wait
开关添加到命令行:
/w
... For a Basic MSI project, the/w
option forcesSetup.exe
to wait until the installation is complete before exiting.
/Clone_wait
... This parameter indicates that the original setup should wait for the cloned setup process to complete before exiting.