ServiceInstaller.DelayedAutoStart 属性

定义

获取或设置一个值,该值指示是否应延迟启动该服务,直到运行其他自动启动的服务。Gets or sets a value that indicates whether the service should be delayed from starting until other automatically started services are running.

public:
 property bool DelayedAutoStart { bool get(); void set(bool value); };
[System.ServiceProcess.ServiceProcessDescription("ServiceInstallerDelayedAutoStart")]
public bool DelayedAutoStart { get; set; }
[<System.ServiceProcess.ServiceProcessDescription("ServiceInstallerDelayedAutoStart")>]
member this.DelayedAutoStart : bool with get, set
Public Property DelayedAutoStart As Boolean

属性值

Boolean

若要延迟该服务的自动启动,则为 true;否则为 falsetrue to delay automatic start of the service; otherwise, false. 默认值为 falseThe default is false.

属性

注解

DelayedAutoStart 属性可应用于任何服务,但会被忽略,除非服务的启动模式为 AutomaticThe DelayedAutoStart property can be applied to any service, but it is ignored unless the service's start mode is Automatic. 此设置将在系统下一次重新启动时生效。The setting takes effect the next time the system is restarted. 服务控制管理器不保证服务的特定开始时间。The Service Control Manager does not guarantee a specific start time for the service.

延迟的自动启动服务不能是加载顺序组的成员,但它可以依赖于另一台自动启动服务。A delayed automatic start service cannot be a member of a load ordering group, but it can depend on another automatic start service. 如果应用程序在加载之前调用延迟的自动启动服务,则调用失败。If an application calls a delayed automatic start service before it is loaded, the call fails.

在不支持延迟自动启动的操作系统上,设置此属性不起作用。On operating systems that do not support delayed automatic start, setting this property has no effect.

适用于