1
votes
  • I have a Windows Service project.
  • I'm using WIX to install my compiled project.
  • I'm using heat to harvest all the necessary files from the project, into my WIX proj, by generating a secondary "heat-only" .wxs file which is then referenced by the primary Product.wxs which has all the hand-crafted XML in it.
  • I want to have the installer automate the installation and startup of the Service.

Can I get this to work nicely?


All the default advise on installing and starting Window Services with WIX assumes that you're going to put extra XML into the Component tag of the .wxs file. But that's being generated by heat, and I'd like to avoid having to make manual edits to that file after heat has created it.

I can't get the commands to "take" when placed in the primary hand-written .wxs file.

Is there a magic incation I've mispronounced?

Is there an overall better way to do this?

1
Before I write up too much, some questions: do you know Paraffin? (I have never used it - maintained?). Have you tried XPath / XSLT to post-process the heat.exe output? Is the service configuration you need stable? In other words, can you put that as static markup? Using ComponentRef? (not tried). Some prefer to put services in a separate setup - that is also possible - most of the time. You can install in sequence using a Burn-built setup.exeStein Åsmul
WiX has as commercial branch as well - FireGiant. They have "HeatWave Harvesting". I don't know anything more, but thought I'd share the link. Red herring if you are almost there with your current approach.Stein Åsmul
@SteinÅsmul. Essentially, yes. My current solution is a simple custom EXE which scans through the file and edits in the relevant lines. Which is basically the same approach. Both that and XSLT approaches seem awful to me, and it's disappointing that they appear to be the 'recommended' way of dealing with this.Brondahl
@SteinÅsmul Parafin and HeatWave both seem like promising options; I'll look further into them.Brondahl
I don't recommend harvesting.Christopher Painter

1 Answers

0
votes

I have a FOSS tool called IsWiX (tutorial here: https://github.com/iswix-llc/iswix-tutorials ) that makes writing a WiX MSI simple. Check out the windows service tutorial.

This (silent) video authored 5 years ago shows that it's possible to create the service and the installer in just over 2 minutes.

https://www.youtube.com/watch?v=bxbcPnjfzIc

There are times that I use heat in the build process ( for example a NodeJS based application) but for the most part I discourage that pattern for reasons outlined here:

http://blog.iswix.com/2007/06/dealing-with-very-large-number-of-files.html