I am trying to add upgrade
feature to my wix installer code
This is my Product section
<?define UpgradeCode = "{8C197FE6-57DF-41FD-A0CD-84B5123123CR}" ?>
<Product Id="*"
Name="!(loc.ProductName_$(var.Platform))"
Language="!(loc.Language)"
Version="$(var.BuildVersion)"
Manufacturer="!(loc.Company)"
UpgradeCode="$(var.UpgradeCode)">
I have below MjaorUpgrade
code in Product.wxs
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)"
AllowDowngrades="no"
AllowSameVersionUpgrades="yes"
RemoveFeatures="ALL"
Schedule="afterInstallInitialize"/>
But, when I run the MSI
it does not remove the old files and do the fresh install? or it should overwrite the files.
I have filter.xslt
as one of the files. Is uninstalling have a dependency on this?
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<xsl:output method="xml" indent="yes" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:key name="exe-search" match="wix:Component[contains(wix:File/@Source, 'MyService.exe')]" use="@Id" />
<xsl:template match="wix:Component[key('exe-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('exe-search', @Id)]" />
</xsl:stylesheet>