Wix - ServiceControl start takes four minutes to fail, should be 30 sec

前端 未结 3 690
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-07 04:49

My service automatically starts during install...



        
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 05:14

    The service itself might be doing something. The service control protocol includes a service status that's returned from the service itself, and this tells Windows what's going on. One of the items in there is a wait hint. Knowing nothing about the service, it's possible that the service is aware that it might have a slow startup and tells Windows (with a wait hint) that it should wait longer. 30 seconds is really a default, not a fixed value. This post refers to the wait hint for a managed code service:

    How to choose value for serviceStatus.dwWaitHint?

    You didn't show the ServiceControl used to install the service, but if it's shared with another service in the same process things can get complicated because the process itself can't terminate while it's also hosting another service.

提交回复
热议问题