InstallShield 未卸载以前的软件版本

InstallShield not uninstalling previous software release

我正在使用 InstallShield 2013 打包我们软件的主要版本。构建setup.exe后,尝试安装软件,发现无法卸载之前的版本,放弃安装。仅当安装了以前版本的软件时才会出现此问题。

InstallShield 应用了以下设置:

我还有一个详细的过程日志,并检查了日志中包含“return 值 3”(失败)的部分。从日志文件我们可以看到FindRelatedProducts这个动作已经找到了之前版本的软件。

我在下面的日志文件中包含了一些片段,它们可能有助于确定问题。

Action 11:55:42: InstallValidate. Validating install
Action start 11:55:42: InstallValidate.

MSI (c) (2C:54) [11:55:42:648]: RESTART MANAGER: Session opened.
MSI (c) (2C:54) [11:55:42:653]: Note: 1: 2262 2: ListBox 3: -2147287038 
Action ended 11:55:42: InstallValidate. Return value 3.
Action ended 11:55:42: INSTALL. Return value 3.

CustomAction  returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 11:55:42: RemoveExistingProducts. Return value 3.

MSI (s) (9C:34) [11:55:53:690]: PROPERTY CHANGE: Deleting UpdateStarted property. Its current value is '1'.
Action ended 11:55:53: INSTALL. Return value 3.

MSI (s) (9C:34) [11:55:54:030]: MainEngineThread is returning 1603
MSI (s) (9C:90) [11:55:54:032]: RESTART MANAGER: Session closed.
MSI (s) (9C:90) [11:55:54:033]: RESTART MANAGER: Session closed.
MSI (s) (9C:90) [11:55:54:034]: User policy value 'DisableRollback' is 0
MSI (s) (9C:90) [11:55:54:034]: Machine policy value 'DisableRollback' is 0
MSI (s) (9C:90) [11:55:54:034]: Incrementing counter to disable shutdown.         Counter after increment: 0
MSI (s) (9C:90) [11:55:54:034]: Note: 1: 1402 2:     HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (9C:90) [11:55:54:034]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (9C:90) [11:55:54:034]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (s) (9C:90) [11:55:54:034]: Restoring environment variables
MSI (c) (2C:4C) [11:55:54:035]: Back from server. Return value: 1603
MSI (c) (2C:4C) [11:55:54:035]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (2C:4C) [11:55:54:035]: PROPERTY CHANGE: Deleting SECONDSEQUENCE property. Its current value is '1'.
Action ended 11:55:54: ExecuteAction. Return value 3.

更新: 我添加了日志的另一部分,其中包含与 InstallValidate 操作相关的信息,因为它可能会使问题更加明显。

Action start 12:25:43: InstallValidate.
MSI (s) (A4:18) [12:25:43:819]: PROPERTY CHANGE: Deleting MsiRestartManagerSessionKey property. Its current value is 'b7f8802fe41c494db739e217b2dcf2bd'.
MSI (s) (A4:18) [12:25:43:820]: Feature: SoftwareName; Installed: Local;   Request: Absent;   Action: Absent
MSI (s) (A4:18) [12:25:43:820]: Feature: freetrial; Installed: Local;   Request: Absent;   Action: Absent
MSI (s) (A4:18) [12:25:43:820]: Feature: studentlicence; Installed: Local;   Request: Absent;   Action: Absent
MSI (s) (A4:18) [12:25:43:820]: Component: __SoftwareName66; Installed: Null;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: __SenintalAdminControlCenter65; Installed: Null;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: __hinstall65; Installed: Null;   Request: Absent;   Action: Absent
MSI (s) (A4:18) [12:25:43:820]: Component: __SoftwareName65; Installed: Null;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: __HaspRuntime65; Installed: Null;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: __MS_Support65; Installed: Null;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: ASCII; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: Doc; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: LIBRARY; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: MASTER; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: MSVideo; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: PDF; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: SAMPLES; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: SKETCH; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: Textures; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: SoftwareName; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: freetrial; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: studentlicence; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: AllOtherFiles; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: SenintalAdminControlCenter; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: x64bin; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: hinstall; Installed: Local;   Request: Absent;   Action: Absent
MSI (s) (A4:18) [12:25:43:820]: Component: HaspRuntime; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: MS_Support; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: Breve32; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: MSPictures; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: haspvendorlib; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: SentAllService; Installed: Local;   Request: Absent;   Action: Absent
MSI (s) (A4:18) [12:25:43:820]: Component: BReveService; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: NeverOverwrtie; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: _1B0A62E7C92FAC42CE4B32C814E0C048; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: _02C2A85C84D8D5F11ECD2931FC44A3F9; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: haspds_msi.dll.6CF3F7DF_6AED_451D_BF8F_AD216156BF2B; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: haspds_windows.dll1.6CF3F7DF_6AED_451D_BF8F_AD216156BF2B; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Component: CreateFolder.6CF3F7DF_6AED_451D_BF8F_AD216156BF2B; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (A4:18) [12:25:43:820]: Note: 1: 2205 2:  3: BindImage 
MSI (s) (A4:18) [12:25:43:820]: Note: 1: 2205 2:  3: ProgId 
MSI (s) (A4:18) [12:25:43:820]: Note: 1: 2205 2:  3: PublishComponent 
MSI (s) (A4:18) [12:25:43:820]: Note: 1: 2205 2:  3: SelfReg 
MSI (s) (A4:18) [12:25:43:820]: Note: 1: 2205 2:  3: Extension 
MSI (s) (A4:18) [12:25:43:820]: Note: 1: 2205 2:  3: Font 
MSI (s) (A4:18) [12:25:43:820]: Note: 1: 2205 2:  3: Class 
MSI (s) (A4:18) [12:25:43:820]: Note: 1: 2205 2:  3: TypeLib 
MSI (s) (A4:18) [12:25:43:823]: Note: 1: 2205 2:  3: _RemoveFilePath 
MSI (s) (A4:18) [12:25:43:824]: PROPERTY CHANGE: Modifying CostingComplete property. Its current value is '0'. Its new value: '1'.
MSI (s) (A4:18) [12:25:43:824]: Note: 1: 2205 2:  3: BindImage 
MSI (s) (A4:18) [12:25:43:824]: Note: 1: 2205 2:  3: ProgId 
MSI (s) (A4:18) [12:25:43:824]: Note: 1: 2205 2:  3: PublishComponent 
MSI (s) (A4:18) [12:25:43:824]: Note: 1: 2205 2:  3: SelfReg 
MSI (s) (A4:18) [12:25:43:824]: Note: 1: 2205 2:  3: Extension 
MSI (s) (A4:18) [12:25:43:824]: Note: 1: 2205 2:  3: Font 
MSI (s) (A4:18) [12:25:43:824]: Note: 1: 2205 2:  3: Class 
MSI (s) (A4:18) [12:25:43:824]: Note: 1: 2205 2:  3: TypeLib 
Action ended 12:25:43: INSTALL. Return value 3.
MSI (s) (A4:18) [12:25:43:824]: Note: 1: 2727 2:  
MSI (c) (A0:38) [12:25:43:847]: RESTART MANAGER: Session opened.
MSI (c) (A0:38) [12:25:43:851]: Note: 1: 2262 2: ListBox 3: -2147287038 
Action ended 12:25:43: InstallValidate. Return value 3.

经过大量研究和修改各种选项后,我终于让它工作了。该问题与我们随软件发布的一些服务有关。这些服务在安装过程中没有停止。为了解决这个问题,我们 将每个组件的 "Shared" 选项设置为否 ,并且 更改了每个组件的组件代码 (GUID),使其不同于往年发布.