The Win32_Service class represents a service on a Win32 computer system. A service application conforms to the interface rules of the Service Control Manager (SCM) and can be started by a user automatically at system boot through the Services control panel utility, or by an application that uses the service functions included in the Win32 API. Services can execute even when no user is logged on to the system.
Win32_Service - child subclasses in ROOT\MicrosoftIISv2
'The Change method modifies a service. It returns an integer value of 0 if the service was successfully modified, 1 if the request is not supported and any other number to indicate an error. The Win32_LoadOrderGroup parameter represents a grouping of system services defining execution dependencies. The services must be initiated in the order specified by the Load Order Group as the services are dependent on each other. These dependent services require the presence of the antecedent services in order to function correctly.'
'The ChangeStartMode method modifies the StartMode of a service. It returns an integer value of 0 if the service was successfully modified, 1 if the request is not supported, and any other number to indicate an error.'
'The Create method creates a new service. It returns an integer value of 0 if the service was successfully created, 1 if the request is not supported, and any other number to indicate an error. The Win32_LoadOrderGroup parameter represents a grouping of system services defining execution dependencies. The services must be initiated in the order specified by the Load Order Group, as the services are dependent on each other. These dependent services require the presence of the antecedent services in order to function correctly.'
'The Delete method deletes an existing service. It returns an integer value of 0 if the service was successfully deleted, 1 if the request is not supported, and any other number to indicate an error.'
'The InterrogateService method requests that the service update its state to the service manager. It returns an integer value of 0 if the InterrogateService request was accepted, 1 if the request is not supported, and any other number to indicate an error.'
'The PauseService method attempts to place the service in the paused state. It returns an integer value of 0 if the PauseService request was accepted, 1 if the request is not supported, and any other number to indicate an error.'
'The ResumeService method attempts to place the service in the resumed state. It returns an integer value of 0 if the ResumeService request was accepted, 1 if the request is not supported, and any other number to indicate an error.'
'The StartService method attempts to place the service into its startup state. It returns one of the following integer values: 0 - The request was accepted. 1 - The request is not supported. 2 - The user did not have the necessary access. 3 - The service cannot be stopped because other services that are running are dependent on it. 4 - The requested control code is not valid, or it is unacceptable to the service. 5 - The requested control code cannot be sent to the service because the state of the service (Win32_BaseService:State) is equal to 0, 1, or 2. 6 - The service has not been started. 7 - The service did not respond to the start request in a timely fashion. 8 - Unknown failure when starting the service. 9 - The directory path to the service executable was not found. 10 - The service is already running. 11 - The database to add a new service is locked. 12 - A dependency for which this service relies on has been removed from the system. 13 - The service failed to find the service needed from a dependent service. 14 - The service has been disabled from the system. 15 - The service does not have the correct authentication to run on the system. 16 - This service is being removed from the system. 17 - There is no execution thread for the service. 18 - There are circular dependencies when starting the service. 19 - There is a service running under the same name. 20 - There are invalid characters in the name of the service. 21 - Invalid parameters have been passed to the service. 22 - The account which this service is to run under is either invalid or lacks the permissions to run the service. 23 - The service exists in the database of services available from the system. 24 - The service is currently paused in the system. '
'The StopService method places the service in the stopped state. It returns an integer value of 0 if the service was successfully stopped, 1 if the request is not supported, and any other number to indicate an error.'
'The UserControlService method attempts to send a user-defined control code to a service. It returns an integer value of 0 if the UserControlService request was accepted, 1 if the request is not supported, and any other number to indicate an error.'
'The CheckPoint property specifies a value that the service increments periodically to report its progress during a lengthy start, stop, pause, or continue operation. For example, the service should increment this value as it completes each step of its initialization when it is starting up. The user interface program that invoked the operation on the service uses this value to track the progress of the service during a lengthy operation. This value is not valid and should be zero when the service does not have a start, stop, pause, or continue operation pending.'
'The WaitHint property specifies the estimated time required (in milliseconds) for a pending start, stop, pause, or continue operation. After the specified amount of time has elapsed, the service makes its next call to the SetServiceStatus function with either an incremented CheckPoint value or a change in CurrentState. If the amount of time specified by WaitHint passes, and CheckPoint has not been incremented, or the CurrentState has not changed, the service control manager or service control program assumes that an error has occurred.'
'CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.'
'The DesktopInteract property indicates whether the service can create or communicate with windows on the desktop. Values: TRUE or FALSE. A value of TRUE indicates the service can create or communicate with windows on the desktop.'
'The DisplayName property indicates the display name of the service. This string has a maximum length of 256 characters. The name is case-preserved in the Service Control Manager. DisplayName comparisons are always case-insensitive. Constraints: Accepts the same value as the Name property. Example: Atdisk.'
'If this service fails to start during startup, the ErrorControl property specifies the severity of the error. The value indicates the action taken by the startup program if failure occurs. All errors are logged by the computer system. The computer system does not notify the user of "Ignore" errors. With "Normal" errorsthe user is notified. With "Severe" errors, the system is restarted with the last-known-good configuration. Finally, on"Critical" errors the system attempts to restart with a good configuration.'
'The ExitCode property specifies a Win32 error code defining any problems encountered in starting or stopping the service. This property is set to ERROR_SERVICE_SPECIFIC_ERROR (1066) when the error is unique to the service represented by this class, and information about the error is available in the ServiceSpecificExitCode member. The service sets this value to NO_ERROR when running, and again upon normal termination.'
'The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.'
'The Name property uniquely identifies the service and provides an indication of the functionality that is managed. This functionality is described in more detail in the object's Description property.'
'The PathName property contains the fully qualified path to the service binary file that implements the service. Example: \SystemRoot\System32\drivers\afd.sys'
'The ServiceSpecificExitCode property specifies a service-specific error code for errors that occur while the service is either starting or stopping. The exit codes are defined by the service represented by this class. This value is only set when the ExitCodeproperty value is ERROR_SERVICE_SPECIFIC_ERROR, 1066.'
'The StartMode property indicates the start mode of the Win32 base service. "Boot" specifies a device driver started by the operating system loader. This value is valid only for driver services. "System" specifies a device driver started by the IoInitSystem function. This value is valid only for driver services. "Automatic" specifies a service to be started automatically by the service control manager during system startup. "Manual" specifies a service to be started by the service control manager when a process calls the StartService function. "Disabled" specifies a service that can no longer be started.'
'The StartName property indicates the account name under which the service runs. Depending on the service type, the account name may be in the form of "DomainName\Username".The service process will be logged using one of these two forms when it runs. If the account belongs to the built-in domain, ".\Username" can be specified. If NULL is specified, the service will be logged on as the LocalSystem account. For kernel or system level drivers, StartName contains the driver object name (that is, \FileSystem\Rdr or \Driver\Xns) which the input and output (I/O) system uses to load the device driver. Additionally, if NULL is specified, the driver runs with a default object name created by the I/O system based on the service name. Example: DWDOM\Admin.'
'The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are "OK", "Degraded" and "Pred Fail". "Pred Fail" indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are "Error", "Starting", "Stopping" and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither "OK" nor in one of the other states.'
'The TagId property specifies a unique tag value for this service in the group. A value of 0 indicates that the service has not been assigned a tag. A tag can be used for ordering service startup within a load order group by specifying a tag order vector in the registry located at: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\GroupOrderList. Tags are only evaluated for Kernel Driver and File System Driver start type services that have "Boot" or "System" start modes.'
'The Win32_Service class represents a service on a Win32 computer system. A service application conforms to the interface rules of the Service Control Manager (SCM) and can be started by a user automatically at system boot through the Services control panel utility, or by an application that uses the service functions included in the Win32 API. Services can execute even when no user is logged on to the system.'