WMI Events

The Intel ME WMI provider publishes WMI events that reflect real-time changes in the current firmware state and are an extension to the WS-Eventing mechanism. Since WMI-events represent changes in firmware state and they are not linked directly to changes in the WMI data model, they are implemented as Extrinsic Events and derived from the _ExtrinsicEvent class.

_ExtrinsicEvent Class

This class defines the structure of extrinsic events messages.

ME_Event : __ExtrinsicEvent {

    uint8 Category;                  // Event category

      uint32 ID;                // Event ID

      string Message;           // Detailed message

      datetime CreationTime;    // Event creation time

    };

Sample Code

The following Visual Basic sample demonstrates receiving Intel ME WMI provider events.

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Intel_ME")

Set objEvents = objWMIService.ExecNotificationQuery _

("SELECT * FROM ME_Event")

 

Wscript.Echo "Waiting for events ..."

Do While(True)

    Set objReceivedEvent = objEvents.NextEvent

 

    'report an event

    Wscript.Echo "ME_Event event has occurred:"

    Wscript.Echo "    Message: " & objReceivedEvent.Message

    Wscript.Echo "    ID: " & objReceivedEvent.ID

    Wscript.Echo "    Category: " & objReceivedEvent.Category

    Wscript.Echo "    CreationTime: " & WMIDateStringToDate(objReceivedEvent.CreationTime)

 

Loop

 

Function WMIDateStringToDate(dtmDate)

  WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _

  Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _

  & " " & Mid (dtmDate, 9, 2) & ":" & Mid(dtmDate, 11, 2) & ":" & Mid(dtmDate,13, 2))

End Function

 

Copyright © 2006-2022, Intel Corporation. All rights reserved.