CindyH
CindyH

Reputation: 3026

How does Wix communicate to me that I'm upgrading?

How do I know if I'm upgrading in Wix (v. 3.0.0.0)? I'm trying to bypass some of the data collection screens on an upgrade, and I'm able to create the new path for screens, but I can't figure out what condition to use. One question on the web says PREVFOUND. At this point, I'm not trying to do anything fancy - just show the value on a new screen of mine. My code shows Installed to be true only when the same installer is re-run, so I know I've got the right idea. However, nothing I can figure out shows PREVFOUND as true, and I also can't find anything else that indicates what variable DOES mean "there's a version 1.0 and you're trying to install 1.1". I do have major upgrade set, and it even works, but I want more customization.

<Control Id="PreviousFound" Type="Text" X="1" Y="15" Width="100" Height="15" Text="IsPrevFound:" />
<Control Id="fes" Type="Text" X="80" Y="15" Width="100" Height="15" Text="False" >
  <Condition Action="show">NOT PREVFOUND</Condition>
  <Condition Action="hide">PREVFOUND</Condition>
</Control>
<Control Id="sfe" Type="Text" X="130" Y="15" Width="100" Height="15" Text="True" >
  <Condition Action="show">PREVFOUND</Condition>
  <Condition Action="hide">NOT PREVFOUND</Condition>
</Control>

<MajorUpgrade AllowSameVersionUpgrades="yes"
              DowngradeErrorMessage="Don't do that!" />

<Product Id="*" Name="$(var.SetupName)" Language="1033" Version="3.4.0.5" Manufacturer="$(var.CompanyLongName)" UpgradeCode="{MY__GUID-EBDE-4221-B203-941E8515A96A}">

Upvotes: 0

Views: 128

Answers (1)

Bob Arnson
Bob Arnson

Reputation: 21886

That's covered in the MajorUpgrade documentation:

When the FindRelatedProducts action detects a related product installed on the system, it appends the product code to the property named WIX_UPGRADE_DETECTED. After the FindRelatedProducts action is run, the value of the WIX_UPGRADE_DETECTED property is a list of product codes, separated by semicolons (;), detected on the system.

Upvotes: 2

Related Questions