1

Through testing, I found out that upgrade of our third party software some how makes our product to not function. However, same tester informed me that uninstall of the old third party software and installing the newer version of the software seem to work.

I was requested to remove the old software prior to installing newer prerequisite. I am quite surprised that the upgrade did not work properly, but I would like to know how I can achieve this.

Would there be any way of uninstalling a product during bundle installer that you know the ProductCode and UpgradeCode for?

EDIT : Further researching, I found following on the third party software website

after upgrading, they must repair the installation in Control Panel/Programs

Would it be possible to run repair after installation via wix?

Shintaro Takechi
  • 1,215
  • 1
  • 17
  • 39
  • Yes, you can generally uninstall any MSI during a major upgrade by utilizing the Upgrade table in the MSI to do so. It is not really good practice to uninstall competitive, unrelated or third party setups though. Can we know what this third party product is? It sounds like they have some major design flaw... – Stein Åsmul Mar 24 '20 at 19:48
  • https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads Under SP26 : If end-user use in-place upgrading from SP25 or previous version, after upgrading, they must repair the installation in Control Panel/Programs. Otherwise the ADO.Net database connection will NOT work. – Shintaro Takechi Mar 24 '20 at 20:31
  • [Here is a WiX sample](https://stackoverflow.com/a/51803320/129130) of how to add entries to the Upgrade table. I suppose you can try to repair the third party product after installation. The basic syntax for repair is: `msiexec.exe /fa {00000000-0000-1111-0000-000000000000}` - [see here](https://www.advancedinstaller.com/user-guide/msiexec.html). – Stein Åsmul Mar 25 '20 at 00:57
  • @SteinÅsmul Wouldn't msiexec with custom action be considered another installer? Thus while running my main installer, it would throw error stating another installer process is running? I actually attempted to run msiexec.exe /x before running the prerequisite with separate installer I created just for uninstalling prerequisite to see if I can uninstall with custom action and got that as error message. Or are you suggesting to run a batch file with msiexec.exe /fa? – Shintaro Takechi Mar 25 '20 at 15:24
  • better than just asking, let me try. – Shintaro Takechi Mar 25 '20 at 15:31
  • Yup if I attempt to go with custom action route, it would return "Another program is being installe. Please wait until that installation is complete, and then try installing this software again" – Shintaro Takechi Mar 25 '20 at 17:33
  • I have added an attempted answer below. MSI does not allow two concurrent InstallExecute sequences to run. This has to do with transactional control of the installation operation. It might be possible to put your custom action to invoke the other setup after InstallFinalize in the InstallExecuteSequence or better yet towards the end of the GUI sequence. Clunky. Try the below first? – Stein Åsmul Mar 25 '20 at 19:55
  • Running Custom action with WixShellExec after InstallFinalize seems to work. Your /fa flag for msiexec definitely helped a lot. Thank you so much! – Shintaro Takechi Mar 25 '20 at 21:03
  • I suppose you could also insert a `Repair.cmd` file into the Burn bundle that triggers the `msiexec.exe /fa [productcode]` command as well. It should work to insert it as an ExePackage, but I haven't tested it much. – Stein Åsmul Mar 25 '20 at 22:43
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/210343/discussion-between-stein-asmul-and-shintaro-takechi). – Stein Åsmul Mar 25 '20 at 23:10

1 Answers1

0

Repairing: To repair another setup at the end of your installation there are a couple of approaches.

  1. MSI: You can insert this msiexec.exe command as a hack at the end of the MSI's installation GUI sequence. This really is a hack - problems can result:

    msiexec.exe /fa {00000000-0000-1111-0000-000000000000}
    
  2. Burn: If you run as part of a Burn Bundle you can insert a Repair.cmd batch file with the above command and insert as an ExePackage into the Burn bundle. Also quite hacky. Snippet

    <..>
    <Chain>
      <!--<MsiPackage SourceFile="Product.msi" />-->
      <ExePackage SourceFile="Repair.cmd" />
    </Chain>
    <..>
    

The best would be to install the latest version of your runtime after you install your own setup first. That seems to be the least error prone.


Setup.exe: I think the better option would be to deliver a setup.exe that would first use the latest version of the third party runtime, then install your own software, and if that does not work try to install the newest version of the third party runtime AFTER you install your own software? Are you familiar with Burn? The setup.exe bootstrapper / downloader / bundler for WiX?

Quick Burn Sample: SQL Server named instance with Visual Studio 2017 Installer project

Setup.exe usage:

  1. Install updated Crystal Reports - latest version
  2. Install your own software package

Or switch around the order if the above fails?

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Yes. I am familiar with Burn and that is how I include and run the Crystal Report installer to begin with. However, It is not a matter of when we run the Crystal Report. SAP's requirement of CR13 SP26 requiring repair in order for ADO.Net database connection to properly function. – Shintaro Takechi Mar 25 '20 at 21:02