I\'m using HeatDirectory to create source .wxs file. In the pickup directory there is an exe which should be installed as service. Actually I know how to install service if
I assume that you already know the name of your file that needs to be wrapped in a ServiceInstall element.
This can be achieved using xsl transformation. The process can be automated using the XslTransformation MSBuild task. Here is what I have done recently:
In the wixproj file in the BeforeBuild target add some parameters to pass on to the xsl, if you like you can hard code these in your xsl and skip this step:
...
Then after your HeatDirectory task call the XslTransformation task like this:
Add the WixService.xsl transformation file to your project. The file is as below:
yes
SERVICEINSTALLER
auto
ownProcess
[USERNAME]
[PASSWORD]
normal
yes
DEPENDENCY
restart
restart
none
60
SERVICECONTROLLER
uninstall
uninstall
no
once done wish for a better way of doing this...