wix - Can we upgrade 1.0.0.0 to 1.0.0.1 while changing product code? -


i'm asked upgrade ver 1.0.0.0 1.0.0.1. default, when tested dummy installer, if change product code, both 1.0.0.0 , 1.0.0.1 install side side.

but if ver 1.0.1.0 (while changing product code), upgrade. here upgrade segment:

   <upgrade id="{354e9dae-eb70-4bcc-bd93-ac20ace3f370}">      <upgradeversion       maximum="$(var.ver)"       property="domajorupgrade"       migratefeatures="yes"       includeminimum="yes"/>    </upgrade> 

question: there method upgrade 1.0.0.0 1.0.0.1?

actually, i'm given scenario this:

  1. when installing 1.0.0.1 on top of 1.0.0.0, 1.0.0.0 needs upgraded.
  2. when installing 1.0.0.0 on top of 1.0.0.1, 1.0.0.0 needs fail.
  3. when installing 1.0.0.1 on top of 1.0.0.1 different product code (only possible in development builds), existing 1.0.0.1 needs uninstall.

checkout topic majorupgrade element:

the following said allowsameversionupgrades attribute:

when set no (the default), installing product same version , upgrade code (but different product code) allowed , treated msi 2 products. when set yes, wix sets msidbupgradeattributesversionmaxinclusive attribute, tells msi treat product same version major upgrade.

this useful when 2 product versions differ in fourth version field. msi ignores field when comparing product versions, 2 products differ in fourth version field same product , need attribute set yes detected.

note because msi ignores fourth product version field, setting attribute yes allows downgrades when first 3 product version fields identical. example, product version 1.0.0.1 "upgrade" 1.0.0.2998 because they're seen same version (1.0.0). reintroduce serious bugs safest choice change first 3 version fields , omit attribute default of no.

this attribute cannot "yes" when allowdowngrades "yes" -- allowdowngrades allows 2 products same version number upgrade each other.

tim's answer 95% correct. don't suggest changing 4th version. said, there way mitigate "accidental downgrade" bug mentioned above. write majorupgrade rule not detect same version. write custom action additional check products greater in fourth field , share upgradecode. set or append detected productcode actionproperty. schedule custom action betweeen findrelatedproducts , removeexistingproducts , you'll desired behavior windows installer never designed for.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -