Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying and trying to find a value in the registry or through WMI (with wbemtest) which tells me that this network adapter uses a wireless connection. There are values in the WMI Win32_NetworkAdapter class like AdapterType but they are only telling me that it is a Ethernet device. On another pc when I query this class then I get a WiFi_NetworkAdapter entry but I think that depends on how the driver vendor has implemented it. I even tried to find something in the registry but couldn't find anything. The only part where I can see that this is a wireless device is when I am looking at the name and description but to be honest that is not a good solution. On Windows XP I found a registry key with a "MediaSubType" field under

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{GUID}\Connection

but on Windows 7 this key seems not to be obligatory.

Any other solution besides Registry or WMI is also very appreciated but please keep in mind that I don't wanna use third party tools because later on I want to write a little C++ program.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

See MediaSubType DWORD value. If MediaSubtype = 2 then network adapter is a wireless device.

powershell gci 'hklm:SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}' -rec ^| gp ^| FT MediaSubtype, Name, PnpInstanceID -Au

Or get _MIB_IF_ROW2 structure, see NDIS_PHYSICAL_MEDIUM.

Also may use PnpInstanceID and PCI ID Repository (database) or PCI Vendor and Device Lists (info).

Get list of all our wireless connections and their signal strengths:

wmic /NAMESPACE:\\ROOT\wmi path MSNdis_80211_ReceivedSignalStrength get *
share|improve this answer
    
I think I will use the MIB_IF_ROW because the MIB_IF_ROW2 is only supported since Vista, right? But yes ... that was is what I've needed. –  SeveFriede Jul 12 '13 at 11:24
    
@SeveFriede Then if I forgot it all depends on the version of NDIS driver. I could be wrong, check the information on the MSDN CD. –  STTR Jul 12 '13 at 11:33
    
Thank you STTR! I think in my C++ code I will go for this function and this should work fine on Windows XP with SP1 and later (: –  SeveFriede Jul 12 '13 at 12:05
    
@SeveFriede wmic nicconfig get MACAddress, IPAddress, Index, ServiceName, Description - get IP address, MAC ... etc) –  STTR Jul 12 '13 at 12:38
    
but MSNdis_80211_ReceivedSignalStrength is only working when a WiFi is connected to a network, right? –  SeveFriede Jul 12 '13 at 13:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.