我正在安装 Windows 服务(实际上很少),这是其中一个的片段:
<Component Id="cmpD9168A36C32F8D411B6EF4270EE6544F" Guid="{E5811AB8-0949-4C75-99BD-6687EB4672D4}" Win64="yes">
<File Id="filD9168A36C32F8D411B6EF4270EE6544F" KeyPath="yes" Source="$(var.LoggerService.ProjectDir)\bin\LoggerService.exe" />
<ServiceInstall
Id="loggerServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="$(var.Manufacturer)LoggerService"
DisplayName="$(var.Manufacturer)LoggerService"
Start="auto"
Account="[PROP_DOMAINUSER]"
Password="[PROP_PASSWORD]"
ErrorControl="ignore"
Interactive="no">
<ServiceDependency Id="LanmanWorkstation"/>
<ServiceDependency Id="LanmanServer"/>
</ServiceInstall>
<ServiceControl Id="loggerStartService" Start="install" Stop="both" Remove="uninstall" Name="$(var.Manufacturer)LoggerService" Wait="yes" />
</Component>
现在,在安装过程中,服务将尝试启动,但根据设计它可能会失败,但没关系。但是现在,当服务失败时,它会询问我是要取消还是重试。我怎么能忽略失败?