I want to customize my installer to show custom dialog when previous version is already installed: after Welcome dialog user should see a custom dialog OldVersionDlg
with information that previous version was found and will be uninstalled automatically.
But for some reason property set by UpgradeVersion
element always null
when I check it in condition in UI/Publish Dialog
.
Here are essential code snippets.
Product.wxs:
<Product Id="*" Version="$(var.Version)" UpgradeCode="$(var.ProductId)"
Language="1033" Name="$(var.ProductFullName)" Manufacturer="$(var.Manufacturer)">
<Package Description="$(var.ProductDescription)" InstallerVersion="200" Compressed="yes"
Manufacturer="$(var.Manufacturer)" />
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="$(var.ProductId)">
<UpgradeVersion Minimum="1.0.0.0" Maximum="$(var.Version)"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
</InstallExecuteSequence>
</Product>
WixUI_Wizard.wxs:
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="OldVersionDlg">PREVIOUSVERSIONSINSTALLED</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg">NOT Installed</Publish>
The button Next doesn't work.
I've checked in logs that PREVIOUSVERSIONSINSTALLED
is set after FindRelatedProducts
. If I use it in conditions in Product.wxs then everything is OK. But in UI configuration it is always null
.
Thanks for any help.