Hello again,
I found a solution to my problem. I used a xsl transormation to filter out my executable file from the harvested files. Then I added it to the parent component of my ServiceInstall element.
The .xslt file looks like 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, 'service.exe')]" use="@Id" />
<xsl:template match="wix:Component[key('exe-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('exe-search', @Id)]" />
</xsl:stylesheet>
You also need to include the path to the .xslt file in your heat.exe command with a "-t" switch e.g. "-t path\to\filter.xslt"
Regards,
Piotr