none
WMI Exception "Not supported " RRS feed

  • Question

  • Hello

    I try to get some data from WMI (wireless signal strength).

    No metter which code I'm using, it is allways throw the next:

    System.Management

    Not supported

    at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)

    it's happen me on winXp,win7

    The code is

     ManagementObjectSearcher searcher = null;
        try
        {
          // Query the management object with the valid scope and the correct query statment  
          searcher = new ManagementObjectSearcher(@"root\WMI", "select Ndis80211ReceivedSignalStrength from MSNdis_80211_ReceivedSignalStrength where active=true");
    
          // Call the get in order to populate the collection  
          ManagementObjectCollection adapterObjects = searcher.Get();
          // Loop though the management object and pull out the signal strength  
          foreach (ManagementObject mo in adapterObjects)
          {
            
            returnStrength = Int32.Parse(mo["Ndis80211ReceivedSignalStrength"].ToString());
            break;
          }
    
        }

    I checked out the security, and my device should be works with the WMI

    but still nothing

    please  enyone?

     

     

     

    Monday, May 24, 2010 9:24 AM