0

I'm using WixSharp to build an installer.

Using Major Upgrade element works as excepted(upgrade and downgrade)

I don't want multiple instances to be installed.

I've copy msi file in two location in the PC,

so I have two files: a.msi and b.msi with same version and upgrade code and different ProductId

installing a.msi works as excepted(open gui with remove option)

installing b.msi didn't work as excepted(install the product instead of saying that this is installed)

In Add/Remove programs I have two entries with same version. How can I to disable it?

R.P
  • 171
  • 1
  • 11

1 Answers1

1

you can do this in two ways.

You can make the ProductId the same so that Windows sees that you install the same thing instead of thinking you are installing two different components (ProductId) of the same softwaresuite (UpgradeCode). This will result in an errormessage that the product is already installed until you increase the version.

Or

You can configure an upgrade fragment.

<Upgrade Id='$(var.UpgradeCode)'>
  <UpgradeVersion OnlyDetect='no' Property='ISUPGRADE'
                  Minimum='1.0' IncludeMinimum='yes'
                  Maximum='$(var.ProductVersion)' IncludeMaximum='yes' />
</Upgrade>

which will uninstall the existing version and install the currently running setup.

scaler
  • 417
  • 1
  • 9