__ExtendedStatus class

The __ExtendedStatus system class is used to report detailed status and error information.

The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties. Properties are listed in alphabetic order, not MOF order.


class __ExtendedStatus : __NotifyStatus
  string Description;
  string Operation;
  string ParameterInfo;
  string ProviderName;
  uint32 StatusCode;


The __ExtendedStatus class has these types of members:


The __ExtendedStatus class has these properties.


Data type: string

Access type: Read-only

Any user-defined string that describes an error or operational status.


Data type: string

Access type: Read-only

Operation that takes place at the time of a failure or anomaly. Typically, Windows Management Instrumentation (WMI) sets this property to the name of a COM API for WMI method such as the following: IWbemServices::CreateInstanceEnum.


Data type: string

Access type: Read-only

Parameters involved in an error or status change. For example, if an application attempts to retrieve a class that does not exist, this property is set to the offending class name.


Data type: string

Access type: Read-only

Identifies the provider that causes or reports an error or status change. If a provider is not involved, this string is set to "Windows Management".


Data type: uint32

Access type: Read-only

Contains an error or information code for an operation. This can be any value defined by the provider, but the value 0 (zero) is usually reserved to indicate success. This property is inherited from __NotifyStatus.


The __ExtendedStatus class is derived from the __NotifyStatus class.

Use the __ExtendedStatus class to report information that is more complex than a simple result code. Providers can derive their own classes from __ExtendedStatus if they require more properties to describe the errors.

The StatusCode property, inherited from the __NotifyStatus parent class, is an unsigned integer that represents the error or status value. When instances of this class are returned from a method by a dynamic provider, the StatusCode and Description properties are set by the provider, and the other properties are set by WMI.


The following code sample, taken from the FND:How to Handle Configuration Manager Asynchronous Errors by Using WMI VBScript code example on TechNet Gallery, describes using __ExtendedStatus to retrieve error information.

Sub sink_OnCompleted(HResult, oErr, oCtx) 
    WScript.Echo "All collections returned" 
    if HResult <> 0 Then  
    ' Determine the type of error. 
        If oErr.Path_.Class = "__ExtendedStatus" Then 
            WScript.Echo "WMI Error: "& oErr.Description             
        ElseIf ExtendedStatus.Path_.Class = "SMS_ExtendedStatus" Then 
            WScript.Echo "Provider Error: "& oErr.Description 
            WScript.Echo "Code: " & oErr.ErrorCode 
        End If 
    End If     
    bdone = true 
End sub


Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
All WMI namespaces

See also


WMI System Classes