0

all/ 有应用程序,应用程序的安装程序由 InstallShield 创建(不是msi 项目)我需要卸载应用程序并等待卸载程序终止。

我阅读了注册表项 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{MyAppGuid}, UninstallString 并尝试启动卸载程序

在我的情况下 UninstallString = "C:\Program Files\InstallShield 安装信息{9F2A3D76-7785-492F-89E5-3F0FE2D205DC}\setup.exe" -runfromtemp -l0x0419 -removeonly

但在 cmd.exe "start /wait {UninstallerString}" 中不要等到卸载程序终止。我认为卸载程序运行相同的临时 exe 并立即终止。但是我该如何解决任何问题呢?任何想法??

4

1 回答 1

1

Installshield/clone_wait在某些时候添加了一个开关来解决您的问题,如下所示

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

您的卸载字符串将如下所示:

UninstallString = "C:\Program Files\...\setup.exe" -runfromtemp -l0x0419 -removeonly /clone_wait

-clone_wait可能也可以,但我已经测试并使用了/clone_wait.

于 2015-07-27T20:30:36.160 回答