0
votes

I need to launch an MSI depending on the version installed on the target machine. To elaborate:

  • MSI shouldnt install if its version is less than the currently installed version.
  • Otherwise it should do REINSTALL using REINSTALLMODE=omus.

I know that this can be done by wrapping the MSI within a bootstrapper application or using cmd to launch MSI. But could this intelligence be implemented within the MSI itself, so that it appropriately launches itself when I double-click it?

Will LaunchCondition or CustomAction help to achieve this?

I am using Visual Studio Setup Project to build my MSI. Will using WIX help to achieve this?

Thanks, -Kunal

1
What's the problem you think you're solving? You're in Visual Studio setups, just do a RemovePreviousVersions upgrade to replace any older version out there, and this will be a fresh install for new clients too.PhilDW

1 Answers

0
votes

The first can be done inside the MSI but the second cannot. The MajorUpgrade Element has the AllowDowngrades and DowngradeErrorMessage attributes that implements a detect and block pattern.

The second isn't possible because it's immutable once the MSI starts. You need to invoke from bootstrapper such as burn to achieve this.