Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 262131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:29:24+00:00 2026-05-11T22:29:24+00:00

Recently I have been learning about WMI and WQL. I found out the list

  • 0

Recently I have been learning about WMI and WQL. I found out the list of Win32 classes (from MSDN) that I can query for but I am not able to find out the list of event classes (should be the subset of the list of Win32 classes isn’t it ?) Does any one have a list or some kind of cheat sheet for this? I am jsut asking this out of curiosity.

Example for an event class – Win32_ProcessStartTrace

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:29:24+00:00Added an answer on May 11, 2026 at 10:29 pm

    Here’s how to list WMI event classes in the root\cimv2 namespace with C# and System.Management:

    using System;
    using System.Management;
    
    class Program
    {
        static void Main()
        {
            string query =
                @"Select * From Meta_Class Where __This Isa '__Event'";
    
            ManagementObjectSearcher searcher =
                new ManagementObjectSearcher(query);
    
            foreach (ManagementBaseObject cimv2Class in searcher.Get())
            {
                Console.WriteLine(cimv2Class.ClassPath.ClassName);
            }
        }
    }
    

    root\cimv2 is the default WMI namespace so you don’t have to use a ManagementScope instance. The WQL query passed to ManagementObjectSearcher is a WMI metadata query. It uses:

    • Meta_Class to designate the query as a schema query, and
    • __This property to recursively list __Event subclasses

    (see here and here).

    WMI class is an event class if its provider implemented as an event WMI provider and must be a subclass of __Event. This doesn’t mean that you can’t use ‘ordinary’ WMI classes like Win32_Process and Win32_Service in WQL event queries. You just have to use one of the __InstanceOperationEvent derived helper classes like __InstanceCreationEvent or __InstanceDeletionEvent, and WMI will use its own event subsystem to deliver events.

    Here is a sample WQL query that subscribes to Win32_Process creation events:

    Select * From __InstanceCreationEvent Within 5 Where TargetInstance Isa 'Win32_Process'
    

    In this case you have to use the Within clause.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I come from classes object orientation languages and recently I have been learning those
I have recently been learning more about design patterns and thought I'd take a
I have recently been learning F# and functional programming. One application I have found
I have recently been learning about doctypes, and was I wondering what the differences
I have recently been thrown into learning ClearCase (I come from a background with
I have been recently digging into Mobile Programming, I practically tried out the J2ME
I have been recently trying to deploy a C# application on a computer that
I've been learning a lot about web technologies recently and I want to put
I've recently taken to learning me a haskell and have been having a pretty
I have been learning MVVM/EF4 (for C#) recently and have followed Julie Lerman's videos.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.