- WMI Library -
WMI Libraly > Win32_ServiceControl Class

Win32_ServiceControl Class

Instances of this class represent instrctions for controlling both installed and uninstalled services.
Namespace value is root/CIMV2.
WMI Provider value is MSIProv.


Properties

  • Arguments
  • A list of arguments for starting services. The arguments are separated by null characters [~]. For example, the list of arguments One, Two, and Three are listed as: One[~]Two[~]Three.

  • Caption
  • A short textual description (one-line string) of the CIM_Setting object.

  • Description
  • A textual description of the CIM_Setting object.

  • Event
  • A bit map representing the operations for which this object applies. The following are the valid values
    Hexadecimal
    Decimal
    Description
    0x001
    1
    Starts the service during the StartServices action.

    0x002
    2
    Stops the service during the StopServices action. \nn 0x004
    4


    0x008
    8
    Deletes the service during the DeleteServices action.

    The following values are only used during an uninstall

    Hexadecimal
    Decimal
    Description

    0x010
    16
    Starts the service during the StartServices action.

    0x020
    32
    Stops the service during the StopServices action.

    0x040
    64


    0x080
    128
    Deletes the service during the DeleteServices action.

  • ID
  • A unique key identifying this service control item within its product.

  • Name
  • Not applicable.

  • ProductCode
  • The product code for the product of which this service control is a part.

  • SettingID
  • The identifier by which the CIM_Setting object is known.

  • Wait
  • A value of 1 in this column means to wait until the service actually completes before proceeding. This implies that the event is critical to the install, and that if the event fails the resulting error cannot be ignored. A value of 0 in this column means to wait only until the service control manager (SCM) reports that this service is in a pending state.


    Methods

    Method not found.

    Example WQL

    SELECT * FROM Win32_ServiceControl
    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...