pub struct Win32_Service {Show 26 fields
pub AcceptPause: Option<bool>,
pub AcceptStop: Option<bool>,
pub Caption: Option<String>,
pub CheckPoint: Option<u32>,
pub CreationClassName: Option<String>,
pub DelayedAutoStart: Option<bool>,
pub Description: Option<String>,
pub DesktopInteract: Option<bool>,
pub DisplayName: Option<String>,
pub ErrorControl: Option<String>,
pub ExitCode: Option<u32>,
pub InstallDate: Option<WMIDateTime>,
pub Name: Option<String>,
pub PathName: Option<String>,
pub ProcessId: Option<u32>,
pub ServiceSpecificExitCode: Option<u32>,
pub ServiceType: Option<String>,
pub Started: Option<bool>,
pub StartMode: Option<String>,
pub StartName: Option<String>,
pub State: Option<String>,
pub Status: Option<String>,
pub SystemCreationClassName: Option<String>,
pub SystemName: Option<String>,
pub TagId: Option<u32>,
pub WaitHint: Option<u32>,
}Expand description
The Win32_Service WMI class represents a process on an operating system.
https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-service
Fields§
§AcceptPause: Option<bool>Indicates whether the service can be paused.
AcceptStop: Option<bool>Indicates whether the service can be stopped.
Caption: Option<String>Short description of the service — a one-line string.
CheckPoint: Option<u32>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: Option<String>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, this property allows all instances of this class and its subclasses to be uniquely identified.
DelayedAutoStart: Option<bool>If True, the service is started after other auto-start services are started plus a short delay.
Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows Server 2016 and Windows 10.
Description: Option<String>Description of the object.
DesktopInteract: Option<bool>Indicates whether the service can create or communicate with windows on the desktop, and thus interact in some way with a user. Interactive services must run under the Local System account. Most services are not interactive; that is, they do not communicate with the user in any way.
DisplayName: Option<String>Name of the service as viewed in the Services snap-in. This string has a maximum length of 256 characters. Note that the display name and the service name (which is stored in the registry) are not always the same. For example, the DHCP Client service has the service name Dhcp but the display name DHCP Client. 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: Option<String>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.
- Ignore (“Ignore”): User is not notified.
- Normal (“Normal”): User is notified. Usually this will be a message box display notifying the user of the problem.
- Severe (“Severe”): System is restarted with the last-known-good configuration.
- Critical (“Critical”): System attempts to restart with a good configuration. If the service fails to start a second time, startup fails.
- Unknown (“Unknown”): Severity of the error is unknown.
ExitCode: Option<u32>Windows error code that defines errors 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: Option<WMIDateTime>Date object is installed. This property does not require a value to indicate that the object is installed.
Name: Option<String>Unique identifier of the service that provides an indication of the functionality that is managed. This functionality is described in the Description property of the object.
PathName: Option<String>Fully qualified path to the service binary file that implements the service.
Example: “\SystemRoot\System32\drivers\afd.sys”
ProcessId: Option<u32>Process identifier of the service.
Example: 324
ServiceSpecificExitCode: Option<u32>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: Option<String>Type of service provided to calling processes.
The values are:
- Kernel Driver (“Kernel Driver”)
- File System Driver (“File System Driver”)
- Adapter (“Adapter”)
- Recognizer Driver (“Recognizer Driver”)
- Own Process (“Own Process”)
- Share Process (“Share Process”)
- Interactive Process (“Interactive Process”)
Started: Option<bool>Indicates whether or not the service is started.
StartMode: Option<String>Start mode of the Windows base service.
- Boot (“Boot”): Device driver started by the operating system loader (valid only for driver services).
- System (“System”): Device driver started by the operating system initialization process. This value is valid only for driver services.
- Auto (“Auto”): Service to be started automatically by the service control manager during system startup. Auto services are started even if a user does not log on.
- Manual (“Manual”): Service to be started by the Service Control Manager when a process calls the StartService method. These services do not start unless a user logs on and starts them.
- Disabled (“Disabled”): Service that cannot be started until its StartMode is changed to either Auto or Manual.
StartName: Option<String>Account name under which a service runs. Depending on the service type, the account name may be in the form of “DomainName\Username” or UPN format (“Username@DomainName”). 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 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”
State: Option<String>Current state of the base service.
The values are:
- Stopped (“Stopped”)
- Start Pending (“Start Pending”)
- Stop Pending (“Stop Pending”)
- Running (“Running”)
- Continue Pending (“Continue Pending”)
- Pause Pending (“Pause Pending”)
- Paused (“Paused”)
- Unknown (“Unknown”)
Status: Option<String>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.
The values are:
- OK (“OK”)
- Error (“Error”)
- Degraded (“Degraded”)
- Unknown (“Unknown”)
- Pred Fail (“Pred Fail”)
- Starting (“Starting”)
- Stopping (“Stopping”)
- Service (“Service”)
- Stressed (“Stressed”)
- NonRecover (“NonRecover”)
- No Contact (“No Contact”)
- Lost Comm (“Lost Comm”)
SystemCreationClassName: Option<String>Type name of the system that hosts this service.
SystemName: Option<String>Name of the system that hosts this service.
TagId: Option<u32>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: Option<u32>Estimated time required, in milliseconds, for a pending start, stop, pause, or continue operation. After the specified 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.
Trait Implementations§
Source§impl Clone for Win32_Service
impl Clone for Win32_Service
Source§fn clone(&self) -> Win32_Service
fn clone(&self) -> Win32_Service
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more