Skip to content

Instantly share code, notes, and snippets.

@rowlandwatkins
Created March 14, 2013 13:39
Show Gist options
  • Save rowlandwatkins/5161368 to your computer and use it in GitHub Desktop.
Save rowlandwatkins/5161368 to your computer and use it in GitHub Desktop.
WiX Service Installation
http://plainoldstan.blogspot.hk/2010/11/wix-installing-and-uninstalling-windows.html:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="9c78f041-c29e-4d80-8d23-e4839e74038c" Name="StansApp"
Language="1033" Version="1.0.0.0"
Manufacturer="Standa" UpgradeCode="b1adfc21-927f-470a-ac87-a5019c84a253">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="StansApp">
<Component Id="ProductComponent" Guid="4810c72f-cb3b-4ef5-b02e-c70a54b8b6ff">
<File Id='StansAppEXE' Name='WindowsService1.exe' DiskId='1'
Source='..\WindowsService1\bin\Debug\WindowsService1.exe'
KeyPath='yes' />
<ServiceInstall Vital='yes' ErrorControl='ignore' Type='ownProcess'
DisplayName='Stans App Win Service'
Description='A proof of concept service' Name='StansWinService' Start='auto' />
<ServiceControl Id='ControlStansWinService' Remove='both' Name='StansWinService'
Start='install' Stop='both' Wait='yes' />
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="WinService" Level="1">
<ComponentRef Id="ProductComponent" />
<ComponentGroupRef Id="Product.Generated" />
</Feature>
</Product>
</Wix>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment