title: How to detect and disable Windows 7 virtual wifi adapter
body: <p>Windows 7 has a (neat?) new feature called a 'virtual wireless adapter'. Read about it here:</p>
  <p><a href="http://www.istartedsomething.com/20090516/windows-7-native-virtual-wifi-technology-microsoft-research/" rel="nofollow noreferrer">http://www.istartedsomething.com/20090516/windows-7-native-virtual-wifi-technology-microsoft-research/</a></p>
  <p>I have an application that directly controls the windows wifi interface card using the Native Wifi API ( <a href="http://msdn.microsoft.com/en-us/library/ms706556%28VS.85%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms706556%28VS.85%29.aspx</a> ).  Please take as a given for this question that I need to directly control the wifi adapter using this documented api and can't just leave it up to OS and user.</p>
  <p>The Windows 7 virtual adapter is supposed to be included with any approved Windows 7 wifi drivers.  The drivers that out there now seem to be pretty buggy, and I've found that unless I manually disable the virtual wifi adapter the real adapter will not reliably connect to a wireless access point when commanded by the WLAN api.</p>
  <p><strong>My main question is 'How to I detect the presence of a windows virtual wifi adapter?'</strong></p>
  <p>Note that the documentation for WlanEnumInterfaces says:</p>
  <blockquote>
  <p>This virtual device normally shows up
  in the “Network Connections Folder” as
  ‘Wireless Network Connection 2’ with a
  Device Name of ‘Microsoft Virtual WiFi
  Miniport adapter’ if the computer has
  a single wireless network adapter.
  This virtual device is used
  exclusively for performing software
  access point (SoftAP) connections and
  is not present in the list returned by
  the  WlanEnumInterfaces function
  .</p>
  </blockquote>
  <p>I suspect there is shell api that might provide the enumeration that the control panel uses to display the virtual adapter.</p>
  <p>For extra credit, how can I disable this adapter programatically?</p>
  <p>Thanks in advance.</p>