Share via


Win32_ServiceSpecification class

The Win32_ServiceSpecification WMI class represents a service that is to be installed with an associated package.

Note

For more information about support or requirements for installation on a specific operating system, see Operating System Availability of WMI Components.

The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties. Properties and methods are in alphabetic order, not MOF order.

Syntax

[Provider("MSIProv"), Dynamic]
class Win32_ServiceSpecification : CIM_Check
{
  string  Caption;
  string  CheckID;
  Boolean CheckMode;
  string  Dependencies;
  string  Description;
  string  DisplayName;
  sint32  ErrorControl;
  string  ID;
  string  LoadOrderGroup;
  string  Name;
  string  Password;
  sint32  ServiceType;
  string  SoftwareElementID;
  uint16  SoftwareElementState;
  string  StartName;
  sint32  StartType;
  uint16  TargetOperatingSystem;
  string  Version;
};

Members

The Win32_ServiceSpecification class has these types of members:

Methods

The Win32_ServiceSpecification class has these methods.

Method Description
Invoke Evaluates a specific check. The details of how the method evaluates a specific check in a CIM context are described by the non-abstract CIM_Check subclasses.

Properties

The Win32_ServiceSpecification class has these properties.

Caption

Data type: string

Access type: Read-only

Short textual description of the object a one-line string.

CheckID

Data type: string

Access type: Read-only

Identifier used together with other keys to uniquely identify the check.

CheckMode

Data type: Boolean

Access type: Read-only

Whether or not the condition is expected to exist in the environment. When TRUE, the condition is expected to exist, for example, a file is expected to be on a system, so the Invoke method is expected to return TRUE.

Dependencies

Data type: string

Access type: Read-only

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 does not have 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

Access type: Read-only

Description of an object.

DisplayName

Data type: string

Access type: Read-only

Service identifier that the user interface programs use.

ErrorControl

Data type: sint32

Access type: Read-only

Action that the startup program takes if the service does not start during startup. One of the following error control flags must be specified. Add the value 0x08000 to the following flags to specify that the overall install fails if the service cannot be installed.

Value Meaning
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 that is known to be good. If the last good configuration is being started, the startup operation fails.

ID

Data type: string

Access type: Read-only

Unique key that identifies the service specification item within its product.

LoadOrderGroup

Data type: string

Access type: Read-only

Name of the load ordering group of which this service is a member.

Name

Data type: string

Access type: Read-only

Name used to identify the software element.

Password

Data type: string

Access type: Read-only

Password associated with StartName.

ServiceType

Data type: sint32

Access type: Read-only

Bit flags that specify the type of service. One of the following service types must be specified.

Value Meaning
SERVICE_WIN32_OWN_PROCESS
0x00000010
Windows service that runs its own process.
SERVICE_WIN32_SHARE_PROCESS
0x00000020
Windows service that shares a process.
SERVICE_INTERACTIVE_PROCESS
0x00000100
Windows 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.

Value Meaning
SERVICE_KERNEL_DRIVER
0x00000001
Driver service.
SERVICE_FILE_SYSTEM_DRIVER
0x00000002
File system driver service.

SoftwareElementID

Data type: string

Access type: Read-only

Identifier for the software element.

SoftwareElementState

Data type: uint16

Access type: Read-only

State of a software element.

Value Meaning
1
Deployable
2
Installable
3
Executable
4
Running

StartName

Data type: string

Access type: Read-only

Account name used to start this service.

StartType

Data type: sint32

Access type: Read-only

Bit flags that specify when to start a service. One of the following types of service start must be specified.

Value Meaning
SERVICE_AUTO_START
0x00000002
Service starts during startup of the system.
SERVICE_DEMAND_START
0x00000003
Service starts when the service control manager calls the StartService function.
SERVICE_DISABLED
0x00000004
Service that cannot be started.

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

Value Meaning
SERVICE_BOOT_START
0x00000000
Device driver started by the operating system loader.
SERVICE_SYSTEM_START
0x00000001
Device driver started by the system initialization process.

TargetOperatingSystem

Data type: uint16

Access type: Read-only

Target operating system of the software element. The possible values for this property are the following:

Value Meaning
0
Unknown
1
Other
2
MACOS
3
ATTUNIX
4
DGUX
5
DECNT
6
Digital Unix
7
OpenVMS
8
HPUX
9
AIX
10
MVS
11
OS400
12
OS/2
13
JavaVM
14
MSDOS
15
WIN3x
16
WIN95
17
WIN98
18
WINNT
19
WINCE
20
NCR3000
21
NetWare
22
OSF
23
DC/OS
24
Reliant UNIX
25
SCO UnixWare
26
SCO OpenServer
27
Sequent
28
IRIX
29
Solaris
30
SunOS
31
U6000
32
ASERIES
33
TandemNSK
34
TandemNT
35
BS2000
36
LINUX
37
Lynx
38
XENIX
39
VM/ESA
40
Interactive UNIX
41
BSDUNIX
42
FreeBSD
43
NetBSD
44
GNU Hurd
45
OS9
46
MACH Kernel
47
Inferno
48
QNX
49
EPOC
50
IxWorks
51
VxWorks
52
MiNT
53
BeOS
54
HP MPE
55
NextStep
56
PalmPilot
57
Rhapsody

Version

Data type: string

Access type: Read-only

Version of a software element. Values should be in the form [Major].[Minor].[Revision] or [Major].[Minor][letter][revision].

Remarks

The Win32_ServiceSpecification class is derived from CIM_Check.

Requirements

Minimum supported client
Windows XP
Minimum supported server
Windows Server 2003
Namespace
Root\CIMV2
MOF
Msi.mof
DLL
Msiprov.dll

See also

Installed Applications Classes