I'm harvesting my project files using Heat. but since I want to have shortcuts on the target system the main executable must be ignored by Heat and added manually in the main wxs file. I'm using the following xsl file to tell heat to ignore my executable file (Aparati.exe)
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
<!-- strip out the exe files from the fragment heat generates. -->
<xsl:template match="@*|*">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:output method="xml" indent="yes" />
<xsl:key name="exe-search" match="wix:Component[contains(wix:File/@Source, 'Aparati.exe')]" use="@Id" />
<xsl:template match="wix:Component[key('exe-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('exe-search', @Id)]" />
</xsl:stylesheet>
The problem is that I don't want to write the filename directly here, instead I want to set the executable filename as an argument (maybe a wix variable) in my msbuild file. I would be very thankful if anyone could tell me how it is possible. And what other approaches can I take to solve this problem.