- WMI Library -
WMI Libraly > Win32_ServiceSpecification Class

Win32_ServiceSpecification Class

Instances of this class represent the services that are to be installed along with an associated package.
Namespace value is root/CIMV2.
WMI Provider value is MSIProv.


Properties

  • Caption
  • Not applicable.

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

  • CheckMode
  • 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
  • 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
  • A description of the objects.

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

  • ErrorControl
  • 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
  • A unique key identifying this service specification item within its product.

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

  • Name
  • The name used to identify this software element

  • Password
  • The password associated with StratName.

  • ServiceType
  • 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
  • This is an identifier for this software element.

  • SoftwareElementState
  • The software element state of a software element

  • StartName
  • The account name used to start this service.

  • StartType
  • 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
  • The target operating system of the this software element.

  • Version
  • Version should be in the form .. or .


    Methods

  • Invoke
  • The invoke method is to evaluate a particular check. The details of how the method evaluates a particular check in a CIM context is described by the non-abstract CIM_Check sub classes. The results of the method are based on the return value. - A 0 (zero) is returned if the condition is satisfied. - A 1 (one) is returned if the method is not supported. - Any other value indicates the condition is not satisfied.


    Example WQL

    SELECT * FROM Win32_ServiceSpecification
    About this site information

    This contents is created by WMI having class information.
    WMI Environment is Windows Server 2008 R2 Enterprise Edition.

    This link is Microsoft documents for "Managing Windows with WMI".
    That is VB(Visual Basic) scripting sample.
    This link is Microsoft documents for "Advanced Programming Topics in WMI .NET".
    That is VB.net(Visual Basic .net) scripting sample.

    - WMI Library -
    http://library.wmifun.net/

    WMI useful by VB,VB.Net,VC,VC.Net,VC#.Net,VBS(WSH),PowerShell for PC asset management, system monitoring and collecting hardware and software inventory.

    This website is created by Toh.
    Copyright(C) 1997-2016 WMI Fun !!. All rights reserved.
    ^ Go to the top...