Monday, August 27, 2012

Introduction

Windows 7 introduces a new virtual driver for WiFi network that create a virtual WiFi AP to share network / Internet connection for any WiFi device. The network adapter is named as Microsoft Virtual Wifi miniport adapter.

Before Windows 7, Adhoc wireless connection is a common WiFi connection that may only connect to one WiFi device only. The Windows Virtual WiFi connection may connect to up 8 WiFi devices.

Check support of Virtual Wifi

The virtual network adapter should install automatically in Device Manager once your WiFi adapter is activated:

A new Wireless Network Connection (e.g.: Wireless Network Connection 2 in the following example) should configure as well:

Everything is ready up to this stage, continue the configuration to turn on the virtual WiFi AP and start sharing your network connection.

Please note that there is no GUI tools to configure virtual WIFI connection. All commands should type in command line console under Administrator privilege.

Configure Virtual WiFi connection

Choose a SSID to identify your virtual WIFI AP and set a password for it. Type the following command in command line console running as administrator to start configure:

C:\Windows\system32>netsh wlan set hostednetwork mode=allow ssid=MyWifi key=password keyUsage=persistent
The hosted network mode has been set to allow.
The SSID of the hosted network has been successfully changed.
The user key passphrase of the hosted network has been successfully changed.

Make sure the physical Wifi adapter is enabled before start the Virtual WiFi connection:

Stop virtual WiFi connection

Run the command to stop connection:

C:\>netsh wlan stop hostednetwork
The hosted network stopped.

Uninstall virtual WiFi adapter

It is not necessary to uninstall virtual WiFi adapter as the uninstall is not permanent. The virtual WiFi adapter will be installed once your reboot machine. If you mean to uninstall the virtual WiFi adapter for current session, try this:

C:\>netsh wlan set hostednetwork mode=disallow
The hosted network mode has been set to disallow.