Update
For some reason, this won't work in Windows 8:
The hosted network couldn't be started.
The group or resource is not in the correct state to perform the requested operation.
I have not found a solution to this problem. The answer remains valid for Windows 7, though.
This feature is called hosted networks. On a Wi-Fi enabled computer running Windows 7, use the following commands in an elevated command prompt:
netsh wlan set hostednetwork mode=MODE ssid=SSID key=KEY keyusage=KEYUSAGE
Changes access point settings. mode
can be allow
or disallow
, specifying whether the access point is enabled. ssid
is the name of the network; key
is the encryption key used for accessing the network. keyusage
can be persistent
or temporary
, indicating whether the key is kept or discarded after one use (the default is persistent
). Note that WPA2-AES is used.
netsh wlan start hostednetwork
Starts the access point.
netsh wlan stop hostednetwork
Stops the access point.
netsh wlan show hostednetwork
Shows the status of the access point.
To allow Internet access through the access point, open the properties for the adapter that provides the Internet connection under Change adapter settings in the Network and Sharing Center, then enable Internet Connection Sharing to the Microsoft Virtual WiFi Miniport Adapter that is providing the wireless connection, usually Wireless Network Connection 2.
Note that the access point created using this procedure uses infrastructure mode. For more information and technical details about hosted networks, see http://msdn.microsoft.com/en-us/library/windows/desktop/dd815243%28v=vs.85%29.aspx.