简体   繁体   中英

Detecting MajorUpgrade in Wix 3.8

I am installing all new versions of my software as major upgrades, as the installations are very small and most of the time, all files change anyway.

I would like to skip one dialog in the installer, if an upgrade as compared to a fresh installation is done, but so far I have failed to figure out what conditional (like "Installed AND PATCH") in the following example to use.

     <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" 
              Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>

You need to show us your major upgrade element or your upgrade elements in the WiX for details, but the way you detect that you're doing an upgrade is to use the upgrade property name. Sometimes the name is PREVIOUSVERSIONSINSTALLED, but if you used the MajorUpgrade elements it sets a property called WIX_UPGRADE_DETECTED.

http://wixtoolset.org/documentation/manual/v3/xsd/wix/majorupgrade.html

That means the condition in your dialog will be:

Not WIX_UPGRADE_DETECTED

if you want to suppress the dialog. You don't want PATCH because you are not doing anything at all related to patches.

You can identify a major upgrade by the special property UPGRADINGPRODUCTCODE .

The condition listed: (Installed AND PATCH) should make the dialog show only during patch installs though?

Check this cheat sheet of MSI conditons from Installshield. It is not complete, but better than nothing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM