4

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>
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
LeRookie
  • 311
  • 3
  • 12

2 Answers2

5

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.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
0

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.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • UPGRADINGPRODUCTCODE seems not to work in that context - and knowing what to look for, I might have found out why: "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." I wonder anyway why "Installed" does not work ... – LeRookie Jun 23 '14 at 16:15
  • I don't get why you have Installed AND PATCH - that would mean the dialog is only shown for patch installs? – Stein Åsmul Jun 24 '14 at 03:55
  • Sorry, "Installed AND PATCH" was just taken from the original dialog set, as an example. It has nothing to do with my installation. "Installed" alone does not work, however ... – LeRookie Jun 24 '14 at 05:46