提问
wix服务恢复
回答
<?xml version="1.0" encoding="UTF-8"?>
<?include Configuration.wxi?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<Component Id="NbApiServiceInstaller" Guid="F7E041AB-3227-4272-92C1-4A12685F30AF" Directory="INSTALLFOLDER" >
<File Id="NbApiEXECFile" Name="NBApi.Application.exe" KeyPath="yes" DiskId='1' Source="$(var.BasePath)\NBApi.Application.exe" Vital="yes" />
<ServiceInstall
Id="ServiceInstaller"
Type="ownProcess"
Name="$(var.ServiceName)"
DisplayName="$(var.ServiceName)"
Description="$(var.ServiceDescription)"
Start="auto"
ErrorControl="ignore"
Interactive="no">
<util:PermissionEx
User="Users"
ServicePauseContinue="yes"
ServiceQueryStatus="yes"
ServiceStart="yes"
ServiceStop="yes"
ServiceUserDefinedControl="yes" />
<util:ServiceConfig ServiceName="$(var.ServiceName)" FirstFailureActionType="restart" SecondFailureActionType="restart" ThirdFailureActionType="restart" ResetPeriodInDays="1" RestartServiceDelayInSeconds="60" />
</ServiceInstall>
<ServiceControl Id="StopService" Start="install" Stop="both" Remove="both" Name="$(var.ServiceName)" Wait="no" />
</Component>
</Fragment>
</Wix>