Note that there are some explanatory texts on larger screens.

plurals
  1. POWiX 3.5 Install Service from Heat, Need from Custom Action?
    primarykey
    data
    text
    <p>I have a VS2010 WiX project with a main .wxs file and an empty .wxs file. The empty .wxs is overwritten in the prebuild event of the project, using heat.exe to harvest everything from a console exe. The exe has InstallUtil hooks, and in the days of VS setup project the exe was installed as a Service.</p> <p>I tried to use the <code>&lt;ServiceInstall&gt;</code> bits in WiX, but when I specified the executable and other elements to get the Service installed, light complained of a collision between the .exe in the main .wxs and the .exe in the heat-generated .wxs.</p> <p>I think Custom Action is not the best way to do the service installation, so I am attempting XSL transformation to get the file out that I don't want (it's a single file out of 100).</p> <p>My XSL must have a problem, because it is not matching/filtering. Here it is:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:Wix="http://schemas.microsoft.com/wix/2006/wi"&gt; &lt;xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" /&gt; &lt;xsl:template match="@* | node()"&gt; &lt;xsl:copy&gt; &lt;xsl:apply-templates select="@* | node()" /&gt; &lt;/xsl:copy&gt; &lt;/xsl:template&gt; &lt;xsl:template match=" Component[File/@Source='$(var.bindir)\servicehost.exe']"/ &lt;/xsl:stylesheet&gt; </code></pre> <p>The parts of the .wxs I need to rip out look like this:</p> <pre><code> .... &lt;Component Id="cmpD64BE1790BFAF0F05DA37558F5D72572" Guid="{6C70DDC8-349B-4B66-A415-DE08E302C2A8}"&gt; &lt;File Id="fil24DFDFCA765C9A8BBB8854CE66AED0E8" KeyPath="yes" Source="$(var.bindir)\servicehost.exe" /&gt; &lt;/Component&gt; .... &lt;ComponentRef Id="cmpD64BE1790BFAF0F05DA37558F5D72572" /&gt; .... </code></pre> <p>What is the best way to make this work?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload