2012-09-21 37 views
0

所有/ 有应用,为应用程序的安装程序是由的InstallShield( MSI项目) 我需要卸载的应用程序,并等待卸载程序终止创建。运行卸载程序,并等待终止

我读的注册表项HKEY_LOCAL_MACHINE \ SOFTWARE \微软\的Windows \ CurrentVersion \卸载{} MyAppGuid,UninstallString和尝试启动卸载程序

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

但在cmd.exe的 “开始/等待{} UninstallerString” 不要等到卸载程序终止。我认为卸载程序运行相同的临时exe文件,并立即终止。但那我该如何解决这个问题呢?任何想法??

+0

你想说什么?你的意思是你需要先卸载并继续安装?请你清楚一点。 – anand

+0

hm,对不起我的Engish.I需要开始卸载并等到卸载完成 – Jack128

+0

想要在安装过程中启动卸载?你尝试过LaunchAppAndWait吗? – anand

回答

1

Installshield的增加在某种程度上解决了您的问题/clone_wait开关,如图here

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一起使用。