add start service on install component.

made conditional based on STARTSERVICEONINSTALL property (defaults to false).
#24
This commit is contained in:
chris.watts90@outlook.com 2017-02-19 21:05:52 +00:00
parent dd788790c0
commit dbd400dbb1
3 changed files with 16 additions and 2 deletions

View File

@ -30,6 +30,7 @@
<Compile Include="DirectoryStructure.wxs" />
<Compile Include="NLog.wxs" />
<Compile Include="Product.wxs" />
<Compile Include="Properties.wxs" />
<Compile Include="SQLiteRepository.wxs" />
<Compile Include="WebPages.wxs" />
</ItemGroup>

View File

@ -2,6 +2,8 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<PropertyRef Id="STARTSERVICEONINSTALL"/>
<ComponentGroup Id="DataCenterComponents">
<ComponentRef Id="URLReservation"/>
<ComponentRef Id="DataCenterFirewallConfig"/>
@ -175,12 +177,17 @@
ResetPeriodInDays="1"
RestartServiceDelayInSeconds="10" />
</ServiceInstall>
</Component>
<Component Id="StartDataCenterServiceOnInsall"
Guid="{884828DC-A47E-4CEF-AEEB-E46FFDFFBED3}"
KeyPath="yes">
<ServiceControl Id="FlexitimeDataCenterStarter"
Start="install"
Stop="uninstall"
Remove="uninstall"
Name="FlexitimeDataCenterService"
Wait="yes" />
Wait="yes"/>
<Condition><![CDATA[STARTSERVICEONINSTALL <> "false"]]></Condition>
</Component>
<Component Id="WindowsDataCenterExeConfig" Guid="{CBFA53EB-0663-4A79-9990-451FC1105A12}">
<File Id="WindowsDataCenter.exe.config"
@ -195,5 +202,5 @@
Checksum="yes"/>
</Component>
</ComponentGroup>
</Fragment>
</Fragment>
</Wix>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<Property Id="STARTSERVICEONINSTALL" Value="false" />
</Fragment>
</Wix>