MajorUpgrade places common (usually two) rows into the Upgrade table using the
UpgradeCode specified in the Product element. One is used for removing previous
product versions and the other row is used for preventing downgrades.
The additional Upgrade element needs an UpgradeVersion child element setup to
detect and remove your WrongUpgradeCode products. The name of the property you
use doesn't matter but should be unique (i.e. not the same as any other
property either you or WiX is currently using). WRONGUPGRADECODEPRODUCT would
probably work just fine. I would recommend including all versions (which I
believe is the default).
RTFM
Blair
> From: kpet...@otaksoft.com
> To: wix-users@lists.sourceforge.net
> Date: Fri, 2 Aug 2013 12:45:32 -0700
> Subject: [WiX-users] Multiple upgrade codes issue
>
> On Tue, 30 Jul 2013 21:50:54 -0700, Blair Murri wrote:
> > You can use the MajorUpgrade element (use the UpgradeCode you prefer in
> > your Product element) and
> > use just the offending UpgradeCode in the Upgrade element (to find/remove
> > versions using it).
>
> Blair,
>
> I tried that but end up with two rows for the good code in my Upgrade table.
>
> Below is my code - am I doing something wrong or does it just not work?
>
>
> ....
> <Product
> Id="$(var.ProductCode)"
> Name="$(var.ProductName)"
> Language="$(var.Language)"
> Version="$(var.ProductVersion)"
> UpgradeCode="$(var.UpgradeCode)"
> Manufacturer="$(var.Manufacturer)"
> >
>
> <Package
> Id="*"
> InstallerVersion="301"
> Compressed="yes"
> InstallScope="$(var.InstallScope)"
> Manufacturer="$(var.Manufacturer)"
> Description="$(var.Description)"
> Keywords="$(var.Keywords)"
> Comments="(var.CopyRight)" />
>
>
>
> <MajorUpgrade
> Schedule="afterInstallExecute"
> DowngradeErrorMessage="A newer version of [ProductName] is already
> installed." />
>
> <Upgrade Id="$(var.WrongUpgradeCode)" />
> ...
>
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent
> caught up. So what steps can you take to put your SQL databases under
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users