0
votes

Hi below are the setting I have set for Version 1 and version 2 .But While I am installing MSI package for Upgrade ,message box pops up and asks to remove previous version of install from Add/remove program instead of removing by itself older version automatically and install newer version.

Please let me know any settings need to be modified.

Version 1 settings below:

  <Product Id="*" Name="CBUDirectMSI" Language="1033" Version="1.0.0.0" Manufacturer="" UpgradeCode="5fa35d9d-5b5a-40f0-9607-e381e728a146">

        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>

        <Upgrade Id="5fa35d9d-5b5a-40f0-9607-e381e728a146">
          <UpgradeVersion Property="OLD_VERSION_FOUND" 
           Minimum="1.0.0.0" 
           Maximum="2.0.0.0" 
           IncludeMinimum="yes" 
           IncludeMaximum="no" 
           OnlyDetect="no" 
           IgnoreRemoveFailure="no" 
           MigrateFeatures="yes" 
           Language="1033" />
          <UpgradeVersion 
          Property="NEWER_VERSION_FOUND" 
          Minimum="2.0.0.0" 
          IncludeMinimum="no" 
          OnlyDetect="yes" 
          Language="1033" />
        </Upgrade>

        <Condition Message="A newer version of [ProductName] is already installed. Exiting installation.">

        </Condition>

        <InstallExecuteSequence>
          <InstallExecute Before="RemoveExistingProducts" />
          <RemoveExistingProducts Before="InstallFinalize" />
        </InstallExecuteSequence>
    </Product>

Version 2 Settings

<Product Id="B55596A8-93E3-47EB-84C4-D7FE07D0CAF4" Name="CBUDirectMSI" Language="1033" Version="2.0.0.0" Manufacturer="" UpgradeCode="5fa35d9d-5b5a-40f0-9607-e381e728a146">

    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>


    <Upgrade Id="5fa35d9d-5b5a-40f0-9607-e381e728a146">
      <UpgradeVersion Property="OLD_VERSION_FOUND" 
       Minimum="1.0.0.0" 
       Maximum="2.0.0.0" 
       IncludeMinimum="yes" 
       IncludeMaximum="no" 
       OnlyDetect="no" 
       IgnoreRemoveFailure="no" 
       MigrateFeatures="yes" 
       Language="1033" />
      <UpgradeVersion 
      Property="NEWER_VERSION_FOUND" 
      Minimum="2.0.0.0" 
      IncludeMinimum="no" 
      OnlyDetect="yes" 
      Language="1033" />
    </Upgrade>

    <Condition Message="A newer version of [ProductName] is already installed. Exiting installation.">

    </Condition>

    <InstallExecuteSequence>
      <InstallExecute Before="RemoveExistingProducts" />
      <RemoveExistingProducts Before="InstallFinalize" />
    </InstallExecuteSequence>
</Product>

Wix Installer does recognize the newer version but doesn't not remove the old version and installs newer version; and gives below message box "but still I am getting error message box saying "Another version of this product is already installed. Installation of this version cannot continue.To Configure or remove the existing version of this product ,use Add/Remove Programs on the Control Panel".

Can any one suggest me where I am going wrong.

1

1 Answers

1
votes

I would recommend using the MajorUpgrade tag instead of the Upgrade one you are currently implementing. MajorUpgrade is a much simpler process to use.

<MajorUpgrade
    Schedule="afterInstallInitialize"
    DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit.">

Example taken from: http://wix.sourceforge.net/manual-wix3/major_upgrade.htm