ManagementObject 参数 WMI 一些参数(Win32_Service)「建议收藏」

ManagementObject 参数 WMI 一些参数(Win32_Service)「建议收藏」classWin32_Service:Win32_BaseService{ booleanAcceptPause; booleanAcceptStop; stringCaption; uint32CheckPoint; stringCreationClassName; stringDescription; booleanDesktopInteract; stri

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

class Win32_Service : Win32_BaseService
{

  boolean AcceptPause;
  boolean AcceptStop;
  string Caption;
  uint32 CheckPoint;
  string CreationClassName;
  string Description;
  boolean DesktopInteract;
  string DisplayName;
  string ErrorControl;
  uint32 ExitCode;
  datetime InstallDate;
  string Name;
  string PathName;
  uint32 ProcessId;
  uint32 ServiceSpecificExitCode;
  string ServiceType;
  boolean Started;
  string StartMode;
  string StartName;
  string State;
  string Status;
  string SystemCreationClassName;
  string SystemName;
  uint32 TagId;
  uint32 WaitHint;
};

 

 

Properties

The Win32_Service class has the following properties.

AcceptPause

Data type:
boolean

Access type: Read-only

 

Service can be paused.

 

AcceptStop

Data type:
boolean

Access type: Read-only

 

Service can be stopped.

 

Caption

Data type:
string

Access type: Read-only

 

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

 

CheckPoint

Data type:
uint32

Access type: Read-only

 

Value that the service increments periodically to report its progress during a long start, stop, pause, or continue operation. For example, the service increments this value as it completes each step of its initialization when it is starting up. The user interface program that invokes the operation on the service uses this value to track the progress of the service during a lengthy operation. This value is not valid and should be zero when the service does not have a start, stop, pause, or continue operation pending.

 

CreationClassName

Data type:
string

Access type: Read-only

Qualifiers:
Key,
MaxLen(
256)

 

Name of the first concrete class to appear in the inheritance chain used in the creation of an instance. When used with the other key properties of the class, the property allows all instances of this class and its subclasses to be uniquely identified.

 

Description

Data type:
string

Access type: Read-only

 

Description of the object.

 

DesktopInteract

Data type:
boolean

Access type: Read-only

 

Service can create or communicate with windows on the desktop.

 

DisplayName

Data type:
string

Access type: Read-only

 

Display name of the service. This string has a maximum length of 256 characters. The name is case-preserved in the Service Control Manager. However, DisplayName comparisons are always case-insensitive. Constraint: accepts the same value as the Name property.

Example: “Atdisk”

 

ErrorControl

Data type:
string

Access type: Read-only

 

Severity of the error if this service fails to start during startup. The value indicates the action taken by the startup program if failure occurs. All errors are logged by the computer system.

Value Meaning
“Ignore” User is not notified.
“Normal” User is notified.
“Severe” System is restarted with the last-known-good configuration.
“Critical” System attempts to restart with a good configuration.
“Unknown” Severity of the error is unknown.

 

ExitCode

Data type:
uint32

Access type: Read-only

 

Windows error code defining any problems encountered in starting or stopping the service. This property is set to ERROR_SERVICE_SPECIFIC_ERROR (1066) when the error is unique to the service represented by this class, and information about the error is available in the ServiceSpecificExitCode property. The service sets this value to NO_ERROR when running, and again upon normal termination.

 

InstallDate

Data type:
datetime

Access type: Read-only

 

Date object is 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 that provides an indication of the functionality that is managed. This functionality is described in more detail in the Description property of the object.

 

PathName

Data type:
string

Access type: Read-only

 

Fully-qualified path to the service binary file that implements the service.

Example: “/SystemRoot/System32/drivers/afd.sys”

 

ProcessId

Data type:
uint32

Access type: Read-only

 

Process identifier of the service.

Example: 324

 

ServiceSpecificExitCode

Data type:
uint32

Access type: Read-only

 

Service-specific error code for errors that occur while the service is either starting or stopping. The exit codes are defined by the service represented by this class. This value is only set when the ExitCode property value is ERROR_SERVICE_SPECIFIC_ERROR (1066).

 

ServiceType

Data type:
string

Access type: Read-only

 

Type of service provided to calling processes.

Values are:

“Kernel Driver”
“File System Driver”
“Adapter”
“Recognizer Driver”
“Own Process”
“Share Process”
“Interactive Process”

 

Started

Data type:
boolean

Access type: Read-only

 

Service has been started.

 

StartMode

Data type:
string

Access type: Read-only

 

Start mode of the Windows base service.

Value Meaning
“Boot” Device driver started by the operating system loader (valid only for driver services).
“System” Device driver started by the operating system initialization process. This value is valid only for driver services.
“Auto” Service to be started automatically by the service control manager during system startup.
“Manual” Service to be started by the service control manager when a process calls the StartService method.
“Disabled” Service that cannot be started.

 

StartName

Data type:
string

Access type: Read-only

 

Account name under which a service runs. Depending on the service type, the account name may be in the form of DomainName/Username. The service process is logged by using one of these two forms when it runs. If the account belongs to the built-in domain, then ./Username can be specified. For kernel or system level drivers, StartName contains the driver object name (that is, /FileSystem/Rdr or /Driver/Xns) which the input and output (I/O) system uses to load the device driver. Additionally, if NULL is specified, the driver runs with a default object name created by the I/O system based on the service name.
Example: “DWDOM/Admin”

Windows XP:  You may use UPN format (
Username@DomainName) to specify the
StartName.

Windows 2000:  To change from a specified user to the LocalSystem account, use ./LocalSystem.

 

 

State

Data type:
string

Access type: Read-only

 

Current state of the base service.

Values are:

“Stopped”
“Start Pending”
“Stop Pending”
“Running”
“Continue Pending”
“Pause Pending”
“Paused”
“Unknown”

 

Status

Data type:
string

Access type: Read-only

 

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

Values are the following:

“OK”
“Error”
“Degraded”
“Unknown”
“Pred Fail”
“Starting”
“Stopping”
“Service”

 

SystemCreationClassName

Data type:
string

Access type: Read-only

 

Type name of the system that hosts this service.

 

SystemName

Data type:
string

Access type: Read-only

 

Name of the system that hosts this service.

 

TagId

Data type:
uint32

Access type: Read-only

 

Unique tag value for this service in the group. A value of 0 (zero) indicates that the service does not have a tag. A tag can be used to order service startup within a load order group by specifying a tag order vector in the registry located at: HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/GroupOrderList. Tags are only evaluated for Kernel Driver and File System Driver start type services that have Boot or System start modes.

 

WaitHint

Data type:
uint32

Access type: Read-only

 

Estimated time required (in milliseconds) for a pending start, stop, pause, or continue operation. After the specified amount of time has elapsed, the service makes its next call to the SetServiceStatus method with either an incremented CheckPoint value or a change in CurrentState. If the amount of time specified by WaitHint passes, and CheckPoint has not been incremented, or CurrentState has not changed, the service control manager or service control program assumes that an error has occurred.

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/186706.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • 已解决是什么意思(read和read)

    今天做项目优化的时候,需要把某个页面的分为两个页面,然后就出现了这个错误这个问题不要慌,要么是打错字了,要么就是忘记传这个字段了(我算是粗心了吧,代码2000行,数据太多了),导致了在另一个页面没有找到这个value字段,因为懂问题所在,我的快速解决方法是直接ctrl+f搜.value然后在另一个页面传过来就行了…

  • 查看linux内核版本号_查看linux系统内核信息命令

    查看linux内核版本号_查看linux系统内核信息命令如何得知自己正在使用的linux是什么版本1.查看内核版本命令:1)[root@q1test01~]#cat/proc/versionLinuxversion2.6.9-22.ELsmp(bhcompile@crowe.devel.redhat.com)(gccversion3.4.420050721(RedHat3.4.4-2))#1SMPMonSep19…

    2022年10月13日
  • Linux查看物理CPU个数、核数、逻辑CPU个数

    Linux查看物理CPU个数、核数、逻辑CPU个数

  • 国内做得好的hr系统_平安hrx下载

    国内做得好的hr系统_平安hrx下载HR专家训练营-X版本成为HR专家系列(X版本)链接:https://pan.baidu.com/s/1–jD9mySf2dIcGKEG-4LYw提取码:8boq备用链接天翼云盘下载不限速,建议使用天翼云下载速度会更快一些https://cloud.189.cn/t/ua2MfmQN7Bnq(访问码:6p4z){1}–课程简介{10}–干部管理{11}–企业文化{1…

  • Android集成lrzsz[通俗易懂]

    Android集成lrzsz[通俗易懂]为啥要移植lrzsz本文中的lrzsz代码点击此处获取Hikey开发板有两类USB口,两组USB-TypeA母口作为Host,可以接键盘、鼠标。另一组mini-USB母口,作为devices,可以接到电脑上调试。但目前这两种接口无法同时使用,即通过键盘鼠标操作时不能使用ADB。虽然可以通过minicom或者putty之类的工具连接串口查看LOG、执行命令。但Android系统中缺少通过串口传

  • php 除法取两位小数,php中除法取整的方法(round,ceil,floor)「建议收藏」

    php 除法取两位小数,php中除法取整的方法(round,ceil,floor)「建议收藏」PHP中遇到需要将除法所得结果取整的情况时,就需要用到以下方法:1.round:四舍五入round()函数对浮点数进行四舍五入。语法:round(x,prec)参数描述x可选。规定要舍入的数字。prec可选。规定小数点后的位数。说明:返回将x根据指定精度prec(十进制小数点后数字的数目)进行四舍五入的结果。prec也可以是负数或零(默认值)。提示:PHP默认不能正确处理类似”…

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号