我们需要将Windows服务的启动类型从"自动"修改为"自动延迟启动".我该怎么做呢?
我的代码是这样的:
<ServiceInstall
Id="WinServiceInstall"
Name="ServiceManager"
DisplayName="ServiceManager"
Type="ownProcess"
Start="auto"
ErrorControl="normal"
Vital ='yes'
Description ='Monitoring and running the jobs'
Account="[SERVICEACCOUNT]"
Password="[SERVICEPASSWORD]">
<util:ServiceConfig
FirstFailureActionType="restart"
SecondFailureActionType="restart"
ThirdFailureActionType ="restart"
cRestartServiceDelayInSeconds ="10" />
</ServiceInstall>
Run Code Online (Sandbox Code Playgroud)
如何设置重启服务时间?如果失败,我想在2分钟后设置重启服务.