I am following this tutorial to set up a Wifi hotspot from my Windows 10 PC.
When I run netsh set hostednetwork mode=allow ssid=Your_SSID key=Your_Passphrase, I think it uses the adapter called Wi-Fi. I have a USB Wifi dongle that I want to use for my hotspot, which is listed as Wi-Fi 2.
Is there a way I can change the above command to use the USB dongle instead of my laptop's built-in Wifi adapter?
2 Answers
The key here is to disable the adapters that you don't want the hostednetwork to start on. If you only have one active adapter and run:
netsh wlan set hostednetwork mode=allow ssid=Your_SSID key=Your_Passphrase
netsh wlan start hostednetworkthen it will auto assign itself to that adapter.
Since you have 2 wireless adapters, wifi1 and wifi2, and you want it to run on wifi2, you can disable wifi1, run script, then enable wifi1 again. This forces hostednetwork on wifi2.
Code:
netsh interface set interface name="Wi-Fi1" admin=disabled
netsh wlan set hostednetwork mode=allow ssid=Your_SSID key=Your_Passphrase
netsh wlan start hostednetwork
netsh interface set interface name="Wi-Fi1" admin=enabledNote: May need to run this batch as administrator.
5For those of you trying to find the interface name you can issue the following command and follow the exising answer.
netsh wlan show drivers