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

  • SEARCH
  • Home
  • 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 8247705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:56:25+00:00 2026-06-07T22:56:25+00:00

I have written a decoupled WMI provider in .NET 4, which has been working

  • 0

I have written a decoupled WMI provider in .NET 4, which has been working just fine. I recently added a class to it that for whatever reason always causes a ManagementException to be thrown with the vague message of “Not supported” in my .NET application querying it. However I can query the class just fine using wmic.

The class follows a similar pattern to other classes in the provider that are working just fine being queried from the application locally. I’m at a loss to explain why I can query it from wmic but not my application. Please help!

EDIT: I tried querying this WMI class from a new console app and got the same exception. WMI Tracing gives me no valuable information, simply that the WMI query was initiated and then the operation stopped two seconds later.

Here is the code for the class:

[ManagementEntity]
public sealed class BootOrder
{        
    [ManagementKey]
    public int Order { get; private set; }

    [ManagementProbe]
    public string DeviceName { get; private set; }

    [ManagementProbe]
    public string Status { get; private set; }

    [ManagementEnumerator]
    public static IEnumerable GetBootOrder()
    {            
        if (WmiUtility.SystemType.Contains("DELL"))
        {
            return GetDellBootOrder();
        }
        else
        {
            // TODO: add code for getting HP values
            throw new NotImplementedException();
        }
    }

    private static IEnumerable GetDellBootOrder()
    {
        foreach (ManagementObject mo in WmiUtility.ExecuteWmiQuery(@"root\DellOMCI", "select BootDeviceName, BootOrder, Status from Dell_BootDeviceSequence"))
        {
            using (mo)
            {
                yield return new BootOrder
                {
                    DeviceName = Convert.ToString(mo["BootDeviceName"]),
                    Order = Convert.ToInt32(mo["BootOrder"]),
                    Status = Convert.ToString(mo["Status"])
                };
            }
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 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-06-07T22:56:28+00:00Added an answer on June 7, 2026 at 10:56 pm

    Face palm So the problem was that the name of the property is “Order”. I’m guessing that’s a reserved word in WQL. I changed the name of the property to “BootOrder” and it works just fine.

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

Sidebar

Related Questions

have written this little class, which generates a UUID every time an object of
I have written a simple stored procedure for updating a record which isn't working
I have written a bash script which installs a number of packages, however for
I have written this code in JavaScript and works perfectly fine when I include
I have written a raw binary image file into a buffer which is an
have written a stochastic simulation in Java, which loads data from a few CSV
I have written a generic class class MyClass : MyClass<string> { } //this line
I have written a Java program which I package and run from a JAR
I have written a PhaseListener in which I am checking for the Validations phase.
I have written a web-service (in Java) which produces as a result a (rather

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.