12

I was following the second answer here in order to avoid "already installed" message for my newer installation packages. So this is the items I've changed. Everything is ok and I'm getting newer versions installed properly.

<Product Id="*" Name="Product Name" Language="1033" Version="1.9.0.0" Manufacturer="ABCD" UpgradeCode="e820aa3a-0288-45d8-a357-41bc065bbed0">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

    <MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

However, compiler gives me the following warning message:

ICE61: This product should remove only older versions of itself. The Maximum version is not less than the current product. (1.9.0.0 1.9.0.0)

I can't just ignore this message. So the question is how to fix this warning?

Community
  • 1
  • 1
Pablo
  • 28,133
  • 34
  • 125
  • 215
  • 2
    Here's how to ignore an ICE warning: http://stackoverflow.com/a/7055515/600559 – Morten Frederiksen Jun 21 '16 at 10:15
  • 2
    I was hopping that it is possible to fix, instead of suppression – Pablo Jun 21 '16 at 10:58
  • 3
    You fix it by incrementing the ProductVersion in the first 3 digits. To state the obvious, you can't allow an upgrade between identical versions when that's explicitly what the warning is about without incrementing the version. – PhilDW Jun 21 '16 at 16:49
  • Of course I am incrementing product version. `1.1.0.0`, `1.2.0.0`, `1.3.0.0`, but I still get this warning. I never wanted to upgrade between identical versions and always increment second(or even first) digit in version. – Pablo Jun 22 '16 at 08:08
  • If the warning claims that you are upgrading between MSI versions of 1.9.0.0 and 1.9.0.0 then something in the incrementing of ProductVersion is not working. – PhilDW Jun 22 '16 at 18:44
  • I am having the same issue. It looks like it is inevitable as WIX tools have no control over Microsoft Installer warnings. https://sourceforge.net/p/wix/bugs/2405/ – Jayee Jul 28 '16 at 06:56

4 Answers4

12

The warning comes from AllowSameVersionUpgrades=Yes. As you write in comment "I never wanted to upgrade between identical versions and always increment second(or even first)", then you dont need AllowSameVersionUpgrade, so just remove it.

FelixSFD
  • 6,052
  • 10
  • 43
  • 117
Kflexior
  • 297
  • 2
  • 9
4

WiX allows you to do same-version installs, but Microsoft doesn't recommend it, hence the warning message.

You can either carry on as is (and live with the compiler whinge), or change your MajorUpgrade section to this:

<MajorUpgrade
  AllowSameVersionUpgrades="no"
  DowngradeErrorMessage="A newer version of [ProductName] is already installed.  If you are sure you want to downgrade, remove the existing installation via the Control Panel" />
AndyUK
  • 3,933
  • 7
  • 42
  • 44
  • can you give more information about "Microsoft doesn't recommend it" ? why? – juFo Feb 21 '18 at 08:42
  • 1
    There's a discussion about it here: https://sourceforge.net/p/wix/bugs/2405/. They don't give much info apart from saying you can do it but it's not encouraged. – AndyUK Feb 21 '18 at 12:57
0

If you want to suppress the warning, you need to add a -sw1076 flag to light.exe. 1076 is the Wix error code, ICE61 is the Microsoft error code.

-1

You can suppress warnings like this:

&"$($env:WIX)\bin\light.exe" -sice:ICE61 "installer\myproduct.wixobj"
Erik Berkun-Drevnig
  • 2,306
  • 23
  • 38