How to retrieve Wireless network information?

I'm trying to use VB.NET in order to collect some information of a WiFi systems - such as WLAN card name, SSID, bandwdith, signal strength...

I think I should use WMI to query these information - but I don't know much about it. Could you please provide me with some details




Answer this question

How to retrieve Wireless network information?

  • sandyJ

    Here is an example of WMI query, hope that it can help you.

    Imports System
    Imports System.Management
    
    Public Class Query_SelectQuery
    
      Public Overloads Shared Function _
        Main(ByVal args() As String) As Integer
    
        Dim selectQuery As SelectQuery
        selectQuery = New SelectQuery("Win32_LogicalDisk")
        Dim searcher As ManagementObjectSearcher
        searcher = New ManagementObjectSearcher(selectQuery)
    
        Dim disk As ManagementObject
        For Each disk In searcher.Get()
          Console.WriteLine(disk.ToString())
        Next
        Console.ReadLine()
        Return 0
    
      End Function
    
    End Class
    
    


  • Ogulcank

    funny, I responded to this type of question a while ago but found out there were problems in Windows XP when trying to retrieve wireless network info, it just error'd out (can't remember what it was) and there have been reports of it happening for many other people too. I don't know if it has been resolved in WS2003 and higher however :-)

  • Pat.

    I think the WMI classes you're looking for are the Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration class. Unfortunately I don't have a wireless card on my computer here or I would tell you exactly which one to use.

    In terms of using WMI from Vb.Net, check out this tutorial. It's quite thorough.

    http://www.devcity.net/Articles/144/1/article.aspx



  • How to retrieve Wireless network information?