WMI011-WMI学习笔记(十一)——Win32_ApplicationService(应用程序服务)类

来源:互联网 发布:mac如何运行exe文件 编辑:程序博客网 时间:2024/06/07 02:46

原文地址链接:

http://msdn.microsoft.com/en-us/library/aa394068(v=vs.85).aspx

测试代码:http://blog.csdn.net/eyuanatqqdotcom/article/details/7463167

Win32_ApplicationService class

Applies to: desktop apps only

The Win32_ApplicationService WMI class represents any installed or advertised component or application available on the system. Instances of this class include all properly installed and instrumented executable files.

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

class Win32_ApplicationService : CIM_Service{  string   Caption;  string   CreationClassName;  string   Description;  datetime InstallDate;  string   Name;  boolean  Started;  string   StartMode;  string   Status;  string   SystemCreationClassName;  string   SystemName;};

Members

成员

The Win32_ApplicationService class has these types of members:

  • Methods
  • 方法
  • Properties
  • 属性

Methods

The Win32_ApplicationService class has these methods.

MethodDescriptionStartService

Places the service in the started state.

StopService

Places the service in the stopped state.

 开始服务:将服务置于开始状态。

停止服务:将服务置于停止状态。

Properties

The Win32_ApplicationService class has these properties.

Caption

标题

Data type: string
Access type: Read-only

Short textual description (one-line) of the object.

对象的短文本描述(一行)

CreationClassName

创建类名称

Data type: string
Access type: Read-only

Name of the class or 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.

实例创建过程中使用的类或者子类的名称。

当和该类的其他关键属性一起使用时,该属性允许该类及其子类的所有实例被唯一标识。

Description

描述

Data type: string
Access type: Read-only

Textual description of the object.

对象的文本描述(多行)

InstallDate

安装日期

Data type: datetime
Access type: Read-only

Date and time object was installed. This property does not need a value to indicate that the object is installed.

对象安装的日期和时间。

该属性不需要任何值来标识对象已经被安装。

Name

名称

Data type: string
Access type: Read-only

Unique identifier of the service which provides an indication of the functionality that is managed. This functionality is described in more detail in the object's Description property.

服务的唯一标识。提供被管理函数的标识。该函数的更多详细信息在对象的Description属性中描述。

Started

开始

Data type: boolean
Access type: Read-only

If TRUE, service has been started.

如果该属性值为True,说明服务已经启动。

StartMode

开始模式

Data type: string
Access type: Read-only

Service can be started automatically started by a operating system, or only started upon request. Values are:

服务可以被操作系统自动启动,也可以尽在有需求时启动。有如下的值:

"Automatic"

自动

"Manual"

手动

Status

状态

Data type: string
Access type: Read-only

Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "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 online, yet the managed element is neither "OK" nor in one of the other states.

对象的当前状态。定义了多种操作的和非操作的状态。操作性的状态包括:"OK"良好, "Degraded"降级, and "Pred Fail"宣布失败。

非操作性状态包括: "Error"错误, "Starting"启动, "Stopping"停止, and "Service"服务。

Values are:

"OK"

"Error"

"Degraded"

"Unknown"

"Pred Fail"

"Starting"

"Stopping"

"Service"

SystemCreationClassName

系统创建类名称

Data type: string
Access type: Read-only

Type name of the system that hosts the service.

支持服务的系统类型名称。

SystemName

系统名称

Data type: string
Access type: Read-only

Name of the system that hosts the service.

支持服务的系统名称。

Remarks

The Win32_ApplicationService class is derived from CIM_Service.

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Namespace

\root\CIMV2

MOF

Cimwin32.mof

DLL

Cimwin32.dll

See also

Installed Applications Classes

原创粉丝点击