1
votes

I’m using InstallShield 2013 to package a major release of our software. After building the setup.exe, and attempting to install the software, it appears to be unable to uninstall the previous version, and abandons the installation. This problem only exists when there is a previous version of the software installed.

InstallShield has the following settings applied:

  • Generated a new ProductCode for the release
  • The UpgradeCode matches the older MSI UpgradeCode
  • A new package code and product version number
  • Under Media > Upgrades, I’ve selected to “Completely uninstall old setup before installing new setup”

I also have a verbose log of the process, and have checked the sections of the log that contain “return value 3” (failures). From the log file we can see that the action of FindRelatedProducts has found the previous version of the software.

I’ve included some snippets from the log file below which may help determine the problem.

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.

Update: I've added another section of the log containing information related to the InstallValidate action as it might make the problem more apparent.

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.
1
Please confirm you are using a Basic MSI project type, that uninstalling it directly (without running the major upgrade) works correctly. Also while return value 3 is a great place to start, it's typically something a bit before it that is meaningful; I can't see anything too meaningful in your snippets. - Michael Urman
Michael - The project is a Basic MSI project type, and the software does run correctly if the previous version is uninstalled first. I've updated the question with a section of the code related to the start and end of the InstallValidate Action -- perhaps it's more meaningful. - nelb

1 Answers

0
votes

After much much research and tinkering with various options I've finally got it working. The issue was related to a few services which we release with our software. These services were not being stopped during the installation process. To fix this we set the "Shared" option of every component to No, and changed the Component Code (GUID), of every component, to be different from the previous years release.