Düzenle

Aracılığıyla paylaş


ChangeStartMode method of the Win32_SystemDriver class

The ChangeStartMode WMI class method modifies the start mode of a Win32_SystemDriver service.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.

Syntax

uint32 ChangeStartMode(
  [in] string StartMode = Auto Start
);

Parameters

StartMode [in]

Start mode of the Windows base service.

Boot Start ("Boot")

Device driver started by the operating system loader. This value is valid only for driver services.

System ("System")

Device driver started by the operating system initialization process. This value is valid only for driver services.

Auto Start ("Automatic")

Service to be started automatically by the service control manager during system startup.

Demand Start ("Manual")

Service to be started by the service control manager when a process calls the StartService method.

Disabled ("Disabled")

Service that can no longer be started.

Return value

Returns a value of 0 (zero) if the service was successfully modified, 1 (one) if the request is not supported, and any other number to indicate an error.

Success (0)

Not Supported (1)

Access Denied (2)

Dependent Services Running (3)

Invalid Service Control (4)

Service Cannot Accept Control (5)

Service Not Active (6)

Service Request Timeout (7)

Unknown Failure (8)

Path Not Found (9)

Service Already Running (10)

Service Database Locked (11)

Service Dependency Deleted (12)

Service Dependency Failure (13)

Service Disabled (14)

Service Logon Failed (15)

Service Marked For Deletion (16)

Service No Thread (17)

Status Circular Dependency (18)

Status Duplicate Name (19)

Status Invalid Name (20)

Status Invalid Parameter (21)

Status Invalid Service Account (22)

Status Service Exists (23)

Service Already Paused (24)

Other (25 4294967295)

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\CIMV2
MOF
CIMWin32.mof
DLL
CIMWin32.dll

See also

Operating System Classes

Win32_SystemDriver