This How-To will assume you have marginal experience in navigating the Windows 7 operating system. First I will cover setting up the host machine, then I will cover setting up the clients that connect to it.
Setting up the Host:
- Decide on a network name, security type, encryption type and the key of the ad-hoc network.
- Disconnect your connection to any wireless network and switch off/disable your wireless device. Turn on/enable your wireless device but don’t connect to any network.
- Click on the network icon in the taskbar.
- Click Open Network and Sharing Center > Manage Wireless Networks > Add.
- Click “Create an ad hoc network”.
- Read the information and click next.
- Enter the network name (SSID), security type, encryption type (if any) and the key that you decided in step 1. Make sure you check the box to “Save this network”!
- The ad hoc network will then be created.
Now that the host has been setup with the ad hoc network, we must configure it to broadcast that network at login in order for clients to be able to connect to it. To enable automatic connection:
- Launch the Task scheduler.
- In the task pane on the left, right click on “Task Scheduler (Local)” and click “Create Task…”
- Under the General tab, name the task “Automatic ad hoc”. Adjust Security options to meet your needs if necessary.
- Under the Triggers tab, click “New…”
- In the New Trigger windows select to begin the task at log on. (Important)
- Under the Actions tab, click “New…”
- The action should be Start a Program, and the program you want to run is netsh.exe (which can be browsed to).
- In the add arguments box, type: “wlan connect NetworkName” (Without the quotes). NetworkName must be substituted with the SSID of your ad-hoc network.
- Click Okay.
- If you are using a laptop, go to the Conditions tab and uncheck the box that says “Start the task only if the computer is on AC power” That will prevent the connection from starting if using battery power. If you aren’t using a laptop, skip this step.
- Click Ok to save the task.
- Log out and back in to see if it works.
Now you must set up the clients to connect to the host. Repeat these steps on all the machines that you will connect to the wireless ad hoc network. To connect a client to the host network:
- Disconnect your connection to any wireless network and switch off/disable your wireless device. Turn on/enable your wireless device but don’t connect to any network.
- Click on the network icon in the taskbar.
- Click Open Network and Sharing Center > Manage Wireless Networks > Add.
- Click “Manually create a network profile”.
- Enter the network name (SSID), security type, encryption type, and the key that you set up on the network host.
- Uncheck both checkboxes, “Start this connection automatically” and “Connect even if the network is not broadcasting”.
- Click Next > Close. Your connection must appear in the list with the icon suggesting infrastructure (two big screens connected to a tube).
- Launch a Command Prompt, type in “netsh wlan set profileparameter name=NetworkName ConnectionType=IBSS” without the quotes, exactly as shown. You must substitute NetworkName with the SSID (network name) of your ad-hoc network set up on the host.
- If everything went well, you’ll see that the icon has now changed to an ad-hoc icon (three small screens connected to each other) in the Manage Wireless Networks window.
- Try connecting to the ad hoc network. You will notice that you no longer need to enter the network key.
- Repeat the task scheduling process above exactly as described to automate the connection process.
You should now be set up with automatically connecting machines using an ad hoc network!