How to set up a direct connection between two computers via Wi-Fi: all the methods

Creating a direct connection between two computers via Wi-Fi is a task faced by both experienced users and novices. This setup allows you to share files without an internet connection, play online games, or use one PC as a server for another. Unlike a traditional router connection, a direct Wi-Fi connection (ad-hoc) works without intermediaries, which speeds up data transfer and increases security.

In this article we will look at three main methods: through mobile hotspot, by using command line and using third-party programs. Each method has its pros and cons—for example, a hotspot is easier to set up but limits speed, while the command line offers more control but requires familiarity with the settings. We'll also cover common errors that prevent connection and provide recommendations for troubleshooting issues with drivers, IP addresses, and firewalls.

Important: If you need to connect computers with different operating systems (for example, Windows 11 And macOS), some steps will be different. This instruction focuses on Windows 10/11, but the key principles apply to other operating systems as well.

1. Preparing computers for connection

Before setting up a direct Wi-Fi connection, make sure both computers meet the minimum requirements:

  • 🖥️ Hardware compatibility: Both PCs must have Wi-Fi adapters that support the mode ad-hoc (almost all modern adapters released after 2012 can do this).
  • 🔄 Drivers: Update your Wi-Fi adapter drivers via device Manager or the official website of the manufacturer (Intel, Realtek, Broadcom).
  • 🔒 Antivirus/firewall: Disable them temporarily or add a local network exception to avoid blocking the connection.
  • 📶 Distance: Computers should be within a 10-15 meter radius (unobstructed). For a greater distance, you will need Wi-Fi amplifier.

Check support ad-hoc You can do this via the command line. Open cmd as administrator and enter:

netsh wlan show drivers

Find the line in the output Hosted network support. If it is indicated there Yes, your adapter is ready to create a direct connection.

2. Method 1: Create a connection via a mobile hotspot (Windows 10/11)

This is the simplest method, requiring no command knowledge. It's suitable for one-time file transfers or temporary internet access from one PC to another.

Steps for a computer that will distribute Wi-Fi:

  1. Open Settings → Network & Internet → Mobile Hotspot.
  2. In the field Sharing select an internet connection (if you need to share the internet) or leave it No.
  3. Click Change and set the network name (SSID) and password (minimum 8 characters).
  4. Turn on the switch Mobile hotspot.

On the second computer, connect to the created network as you would to a regular Wi-Fi network. Once connected, check the availability of resources:

  • 📁 Open Net in Explorer - the second computer should appear there.
  • 🔌 If the computers can't see each other, check your settings Public access V Control Panel → Network and Internet → Network and Sharing Center → Advanced Sharing Settings.
📊 Which connection method do you use most often?
Mobile hotspot
Command line
Third-party programs
I don't connect computers directly
Why might a hotspot not work?

If your mobile hotspot won't turn on, it could be because:

- Outdated Wi-Fi adapter driver (update via device Manager).

- Conflict with VPN or antivirus (disable them temporarily).

- Group Policy restrictions (relevant for corporate PCs).

3. Method 2: Configuration via the command line (ad-hoc network)

This method gives you more control over your network settings, but requires careful execution of commands. We'll create access point on one computer and connect the second one to it.

Run the following commands on the computer that will be distribute Wi-Fi (as administrator):

netsh wlan set hostednetwork mode=allow ssid=MyWiFiNet key=12345678 keyUsage=persistent

netsh wlan start hostednetwork

Where:

- MyWiFiNet — network name (can be changed).

- 12345678 — password (minimum 8 characters).

After running the second command, the network should appear. Now you need to enable Internet sharing (if necessary):

  1. Open Control Panel → Network and Internet → Network and Sharing Center → Change adapter settings.
  2. Find your primary internet connection (eg. Ethernet), right-click → Properties → tab Access.
  3. Check the box Allow other network users to share your Internet connection and select the created connection (Local Area Connection* X).

Make sure the network is visible on the second PC|The password is entered correctly|File sharing is enabled on both PCs|A firewall is not blocking the connection-->

On the second computer, connect to the network MyWiFiNet with a password 12345678If the connection is established, but the Internet is not working, check the settings IPv4:

  • On the second PC, open Properties connections → Internet Protocol version 4 (TCP/IPv4).
  • Install Obtain an IP address automatically And Obtain DNS server address automatically.

4. Method 3: Using third-party programs

If standard methods don't work (for example, due to outdated drivers or Windows limitations), you can use third-party utilities. They offer more flexible settings and often resolve compatibility issues.

Top 3 programs for creating a Wi-Fi network between computers:

Program Advantages Flaws Link
Connectify Hotspot Simple interface, support WPA3, Internet distribution Paid version for advanced features Official website
Virtual Router Free, open source, easy to customize Hasn't been updated since 2016, may not work on Windows 11 GitHub
mHotspot Support for up to 10 devices, traffic monitoring Advertising in the free version Official website

Example of setting in Connectify Hotspot:

  1. Download and install the program.
  2. In the field Hotspot Name enter the network name in Password - password.
  3. IN Internet to Share select your primary connection (or No Internet Sharing, if the Internet is not needed).
  4. Click Start Hotspot.

5. Setting up shared access to files and folders

Once the connection between the computers is established, you need to set up file sharing. To do this:

On the computer, the resources of which need to be discovered:

  1. Right-click on the folder → Properties → tab Access.
  2. Click Share and select a user All (or a specific user if the network is secure).
  3. Set the access level: Reading or Reading and writing.

On the second computer:

  1. Open ConductorNet.
  2. Find the name of the first computer and open the shared folder.
  3. If the folder is not visible, enter it in the address bar. \\Computer IP address (For example, \\192.168.137.1).

For convenience, you can secure network folder in Favorites or create a shortcut on the desktop.

How to find out the IP address of a computer on a local network?

Open command prompt and type ipconfigFind the adapter Wireless network and a line IPv4 address (For example, 192.168.137.1).

6. Common mistakes and their solutions

Even with the correct settings, the connection may not work. Let's look at the most common issues and how to fix them.

Problem 1: Computers can't see each other on the network

  • ⚠️ Check that both PCs are enabled File and Printer Sharing V Network and Control Center.
  • ⚠️ Make sure the computers are on the same working group (by default WORKGROUP). You can change it in System Properties → Computer Name.
  • ⚠️ Disable Windows Firewall or add an exception for file sharing.

Problem 2: No internet access on the second computer

  • ⚠️ Check that the adapter is enabled in the main PC's settings Allow other users to use the connection.
  • ⚠️ Make sure IP addresses are assigned automatically (DHCP). If not, assign static addresses manually (e.g. 192.168.137.1 And 192.168.137.2).

Problem 3: The connection keeps dropping

  • ⚠️ Check if your Wi-Fi adapter is overheating (especially on laptops). Use this utility HWMonitor for temperature monitoring.
  • ⚠️ If you are using the command line, start the network with the command netsh wlan start hostednetwork after each reboot.

7. Direct Wi-Fi connection security

A direct connection between computers is more vulnerable than a connection through a router because there is no hardware protection. Follow these recommendations to minimize the risks:

  • 🔐 Use a complex password (at least 12 characters with numbers and special characters).
  • 🛡️ Turn off sharing for all folders except those you really need.
  • 👁️ Check your connected devices regularly Network and Control Center.
  • 🔄 Change the network password after each session if the connection is temporary.

Important: If you're connecting to other people's networks (for example, at a cafe or airport), never use a direct Wi-Fi connection to transmit sensitive data. Attackers can intercept traffic through vulnerabilities in the WPA2 protocol.

For additional protection:

  • Enable file encryption (BitLocker or VeraCrypt).
  • Use a VPN (eg. ProtonVPN) to encrypt traffic.

8. Alternative ways to connect computers

If your Wi-Fi connection is unstable or unavailable, consider these alternatives:

1. Connection via Ethernet (LAN)

  • 🔌 Connect the computers with a cable cross-over (for old network cards) or regular patch-cord (for modern adapters with Auto-MDI/MDIX).
  • 🖱️ Set up static IP addresses (e.g. 192.168.1.1 And 192.168.1.2) and disable the firewall.

2. Bluetooth connection

  • 📱 Suitable for transferring small files (up to 10 MB).
  • 🔗 Turn on Bluetooth on both PCs, search for devices, and confirm pairing.

3. USB cable (Bridge)

  • 🔌 Special required USB-Link cable or two regular USB cables with an adapter.
  • 💻 Install the driver (for example, USB Network Gate) and configure the network as for Ethernet.

Each of these methods has its limitations. For example, Ethernet provides maximum speed (up to 1 Gbps), but requires a cable, and Bluetooth Works wirelessly, but is extremely slow.

FAQ: Frequently asked questions about setting up a connection

Is it possible to connect a Windows computer and a Mac via Wi-Fi?

Yes, but the setup will be different. Windows create a network via command line (as in Method 2), and on Mac connect to it via System Preferences → Network → Wi-FiTo share files on your Mac, enable General access V System settings and add the folder to Shared folders.

Why is my Wi-Fi file transfer speed slow?

The speed depends on several factors:

  • Wi-Fi standard: 802.11n (up to 300 Mbps) vs 802.11ac (up to 1 Gbit/s).
  • Channel and congestion: use channels 5 GHz (less loaded) and utilities like Wi-Fi Analyzer to select a free channel.
  • Distance and obstacles: Walls, furniture and other devices (microwaves, cordless phones) reduce speed.

For maximum speed, connect computers via Ethernet or use Wi-Fi 6.

How can I make the network start automatically when I turn on my computer?

Create .bat- a file with the following contents:

@echo off

netsh wlan start hostednetwork

exit

and add it to Autoload (shell:startup). Alternatively, use Task Scheduler:

  1. Open Task SchedulerCreate a task.
  2. Set the trigger At startup.
  3. In the action, specify Launching the program and the path to the file with the command.
Is it possible to play online games through such a connection?

Yes, but with some reservations:

  • 🎮 For modern games (CS2, Fortnite) it is better to use Ethernet — Wi-Fi delays can be critical.
  • 🕹️ For old games (Counter-Strike 1.6, Warcraft III) or indie Wi-Fi projects will do.
  • 🔌 Set up Direct connection (LAN) in the game settings and specify the local IP of the second computer.

If the game does not see the second player, check that the game ports are open in the firewall.

How to share internet from your phone to two computers simultaneously?

To do this:

  1. Turn on Access point on smartphone (Android/iOS).
  2. Connect both computers to this point.
  3. On one of the PCs, set up Internet sharing via Mobile hotspot (as in Method 1).

The second computer will receive the Internet through the first, but the speed will decrease due to double broadcasting.