How to Connect Two Laptops Via Wi-Fi
When two laptops with Wi-Fi connect to the same wireless router, the computers can communicate over the local area network, just as if you connected to the router using Ethernet cables. If you want to network two computers directly, however, you can connect them via Wi-Fi using an ad-hoc network. This enables file sharing and other network features even when you aren't near a router.
Press "Windows-X" and click "Command Prompt (Admin)" on either laptop. Enter the administrator password to continue if prompted.
Type "netsh wlan show drivers" (omitting quotes here and throughout) and press "Enter."
Read the line titled "Hosted network supported." You may need to scroll up in the command prompt window to find it. If the line displays "Yes," you can create an ad hoc network. If it shows "No," your laptop does not support this feature. In this case, try the same steps on the second laptop -- only one machine needs to support network creation.
Type "netsh wlan set hostednetwork mode=allow ssid=" followed by a name for your network. After the name, type "key=" and a password for the network. The full command will look like the following example:
netsh wlan set hostednetwork mode=allow ssid=samplenetwork key=samplepassword
Press "Enter" to create the network.
Type "netsh wlan start hostednetwork" and press "Enter" to open the network to other computers.
Click the network status icon on the taskbar of the other laptop. Pick the network you created from the list and enter the password -- connecting to an ad hoc network works just like connecting to a regular wireless network.
Open the Network window on either laptop to locate the other laptop's shared folders. You can reach this window by pressing "Windows-E" and clicking "Network" in the left panel.
- The steps in this article apply to Windows 8 and 8.1. They may vary slightly or significantly with other versions.
- On Windows 7 and Vista, you could set up an ad hoc network directly in the Network and Sharing Center control panel. If you're using one of these versions, open the Control Panel, click "Set up a new connection or network" and pick "Set up a wireless ad hoc (computer-to-computer) network."