Home Reference WMI Reference root CIMV2 Win32_ServiceSpecification
 

Win32_ServiceSpecification

Instances of this class represent the services that are to be installed along with an associated package.

Quick Start

Properties

In this WMI class, all WMI properties are read-only. You can only read values but not change them.

Caption

Data type String

CheckID

Data type String

An identifier used in conjunction with other keys to uniquely identify the check

CheckMode

Data type Boolean

The CheckMode property is used to indicate whether the condition is expected to exist or not exist in the environment. When the value is $true, the condition is expected to exist (e.g., a file is expected to be on a system) so invoke() is expected to return $true. When the value is $false, the condition is not expect to exist (e.g., a file is not to be on a system) so invoke is expected to return $false

Dependencies

Data type String

This column is a list of names of services or load ordering groups that the system must start before this service. Names in the list are separated by Nulls. If the service has no dependencies, then Null or an empty string is returned. Dependency on a group means that this service can run if at least one member of the group is running after an attempt to start all members of the group.

Description

Data type String

A description of the objects.

DisplayName

Data type String

This property is the string that user interface programs use to identify the service.

ErrorControl

Data type SInt32

This column specifies the action taken by the startup program if the service fails to start during startup. One of the following error control flags must be specified in this column.

Adding the value 0x08000 to the flags in the following table specifies that the overall install will fail if the service cannot be installed into the system.

Value

Startup program’s action

0x00000000

Logs the error and continues with the startup operation.

0x00000001

Logs the error, displays a message box and continues the startup operation.

0x00000003

Logs the error if it is possible and the system is restarted with the last configuration known to be good. If the last-known-good configuration is being started, the startup operation fails.

ID

Data type String

A unique key identifying this service specification item within its product.

LoadOrderGroup

Data type String

This property contains the string that names the load ordering group of which this service is a member.

Name

Data type String

The name used to identify this software element

Password

Data type String

The password associated with StratName.

ServiceType

Data type SInt32

This property is a set of bit flags that specify the type of service.

One of the following service types must be specified in this column.

Type of service

Value

Description

SERVICE_WIN32_OWN_PROCESS

0x00000010

A Microsoft Win32? service that runs its own process.

SERVICE_WIN32_SHARE_PROCESS

0x00000020

A Win32 service that shares a process.

SERVICE_INTERACTIVE_PROCESS

0x00000100A

Win32 service that interacts with the desktop. This value cannot be used alone and must be added to one of the two previous types.

The following types of service are unsupported.

Type of service

Value

Description

SERVICE_KERNEL_DRIVER

0x00000001

A driver service.

SERVICE_FILE_SYSTEM_DRIVER

0x00000002

A file system driver service.

SoftwareElementID

Data type String

This is an identifier for this software element.

SoftwareElementState

Data type UInt16

The software element state of a software element

StartName

Data type String

The account name used to start this service.

StartType

Data type SInt32

This property is a set of bit flags that specify when to start the service.

One of the following types of service start must be specified in this column.

Type of service start

Value

Description

SERVICE_AUTO_START

0x00000002

A service start during startup of the system.

SERVICE_DEMAND_START

0x00000003

A service start when the service control manager calls the StartService function.

SERVICE_DISABLED

0x00000004

Specifies a service that can no longer be started.

The following types of service starts are valid only for driver services.

Type of driver service start

ValueDescription

SERVICE_BOOT_START

0x00000000

A device driver started by the operating system loader.

SERVICE_SYSTEM_START

0x00000001

A device driver started by calling the IoInitSystem function. Use this in the ServiceControl Table, with the StartServices action put after the InstallServices action, to start a driver service during an install.

TargetOperatingSystem

Data type UInt16

The target operating system of the this software element.

Version

Data type String

Version should be in the form .. or .

Methods

Examples

See Also

Help and Questions

  Community Content

You are cordially invited to add knowledge to this page. If you have sample code or additional information related to this WMI class, please share it. Use the comment form to send your information. We will edit and incorparate it into the reference library. Thank you!

Please do not use the comment form to submit questions. If you have questions or need assistance, visit our free forum: Help me with WMI.

Content last updated: 2013-12-27 12:29:48 (UTC).

Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin