Wix 如何通知我我正在升级?

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

我如何知道我是否在升级 Wix(3.0.0.0 版)?我试图在升级时绕过一些数据收集屏幕,并且我能够为屏幕创建新路径,但我不知道要使用什么条件。网络上的一个问题说 PREVFOUND。在这一点上,我不想做任何花哨的事情——只是在我的新屏幕上显示值。我的代码仅在重新 运行 相同的安装程序时才显示 Installed 为真,所以我知道我的想法是正确的。但是,我无法弄清楚的是 PREVFOUND 为真,而且我也找不到任何其他表明变量确实意味着什么的东西 "there's a version 1.0 and you're trying to install 1.1"。我确实有主要的升级设置,它甚至可以工作,但我想要更多的定制。

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

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.