2

UPGRADINGPRODUCTCODE condition not working in wixui_install.wxs in library

I want to change the value of next button to respective dlg if first time install and for major upgrade.

This is not working in wix library.

Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="PortNoDlg" >LicenseAccepted = "1" AND NOT UPGRADINGPRODUCTCODE

Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" >LicenseAccepted = "1" AND UPGRADINGPRODUCTCODE

1 Answer 1

3

UPGRADINGPRODUCTCODE is set only for the hidden uninstallation of a package found via the Upgrade table and FindRelatedProducts/RemoveExistingProducts. This does not show any UI, so conditioning control events off of this property will not be helpful.

By contrast UPGRADINGPRODUCTCODE is not set for the newer installation. If you want to condition your control events on whether a previous version will be uninstalled, you must reference the properties specified in the ActionProperty of each record in the Upgrade table.

Sign up to request clarification or add additional context in comments.

2 Comments

I have done that in my project. so is there any other way which will distinguish which action to perform while first installation and which will be while major upgrade. I have tried with
"NEWER_VERSION_FOUND" AND "OLD_VERSION_FOUND" <Upgrade Id="$(var.ProductUpgradeCode)"> <UpgradeVersion Property="NEWER_VERSION_FOUND" OnlyDetect="yes" Language="1033" Minimum="$(var.ProductFullVersion)" IncludeMinimum="no"/> <UpgradeVersion Property="OLD_VERSION_FOUND" OnlyDetect="no" Language="1033" Minimum="$(var.ProductMinimumVersion)" Maximum="$(var.ProductFullVersion)" IncludeMinimum="yes" IncludeMaximum="no" IgnoreRemoveFailure="yes" MigrateFeatures="yes"/></Upgrade>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.