ServiceStartMode ServiceStartMode ServiceStartMode ServiceStartMode Enum

定义

指示服务的启动模式。Indicates the start mode of the service.

public enum class ServiceStartMode
public enum ServiceStartMode
type ServiceStartMode = 
Public Enum ServiceStartMode
继承
ServiceStartModeServiceStartModeServiceStartModeServiceStartMode

字段

Automatic Automatic Automatic Automatic 2

指示服务将由(或已由)操作系统在系统启动时启动。Indicates that the service is to be started (or was started) by the operating system, at system start-up. 如果一个自动启动的服务依赖于手动启动的服务,则该手动启动的服务也会在系统启动时自动启动。If an automatically started service depends on a manually started service, the manually started service is also started automatically at system startup.

Boot Boot Boot Boot 0

指示该服务是由系统加载程序启动的设备驱动程序。Indicates that the service is a device driver started by the system loader. 此值仅对设备驱动程序有效。This value is valid only for device drivers.

Disabled Disabled Disabled Disabled 4

指示服务已禁用,因此无法由用户或应用程序启用。Indicates that the service is disabled, so that it cannot be started by a user or application.

Manual Manual Manual Manual 3

指示服务仅由用户(使用服务控制管理器)或应用程序以手动方式启动。Indicates that the service is started only manually, by a user (using the Service Control Manager) or by an application.

System System System System 1

指示该服务是由 IOInitSystem 函数启动的设备驱动程序。Indicates that the service is a device driver started by the IOInitSystem function. 此值仅对设备驱动程序有效。This value is valid only for device drivers.

注解

ServiceStartMode由服务安装程序使用, 用于指示是否应在系统启动时禁用新服务、系统是否应在系统启动时自动启动该服务, 或者该服务是否应由用户手动启动或程序.The ServiceStartMode is used by the service installer to indicate whether the new service should be disabled at system startup, whether the system should start the service automatically at system startup, or whether the service should be started manually by a user or application. ServiceController.StartType属性还可用于指示特定服务的启动方式。It is also used by the ServiceController.StartType property to indicate how a particular service starts.

适用于

另请参阅