Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to update wise installer package with wix installer

Tags:

wix

I have a msi setup file which was created with wise for windows installer. Now I want to create a new version of this installer with Wix toolset. The problem is, that the installer detects the previous installed (wise created) version, but isn't able to upgrade it. I get the following error message:

"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"

I set the same upgrade code in both installers and chacnged the product code and the package code in the wix project. I set the upgrade informations as follows:

<!-- Upgrade information -->
<Upgrade Id="$(var.UpgradeCode)">
    <UpgradeVersion Property="NEWPRODUCTFOUND"
                  IncludeMinimum="no"
                  Minimum="$(var.ProductVersion)"
                  OnlyDetect="yes"/>

    <UpgradeVersion Property="OLDPRODUCTFOUND"
                  IncludeMinimum="yes"
                  Minimum="0.5.0"
                  IncludeMaximum="no"
                  Maximum="$(var.ProductVersion)"/>

    <UpgradeVersion Property="NEWERVERSIONINSTALLED"
                  IncludeMinimum="yes"
                  Minimum="$(var.ProductVersion)"
                  OnlyDetect="yes" />
</Upgrade>

I also tried to ensure that the product will be installed for all users by setting the InstallScope to "perMachine"

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

I have other installer projects where all versions were created with wix and for them the upgrade works fine.

like image 523
Emu Avatar asked May 03 '11 09:05

Emu


People also ask

How do I run as administrator in WiX Installer?

Setup tab > Run after execution input: your msi file name. Advanced tab > Mark Request Administrative access option checkbox.

What is MSI upgrade code?

The UpgradeCode property is a GUID representing a related set of products. The UpgradeCode is used in the Upgrade Table to search for related versions of the product that are already installed. This property is used by the RegisterProduct action.

Is WiX toolset free?

Windows Installer XML Toolset (WiX, pronounced "wicks"), is a free software toolset that builds Windows Installer packages from XML.


1 Answers

Make sure you increase the Product Version. Only newer product version can automatically upgrade the original package.

Also, please note that Windows Installer ignores the fourth version field (in case you are using it).

like image 120
rmrrm Avatar answered Oct 16 '22 02:10

rmrrm