I'm trying to connect my computer (PC1) to an existing ad hoc using cmd commands.This ad hoc was created by second computer(PC2),i spend hours to find results but i did find an answers.See this photo to understand me.
Netsh wlan export profile folder=”c:\profiles” name="Profile 1" interface="Wireless Network Connection"
Netsh wlan add profile filename=C:\Users\WirelessUser\Documents\profile1.xml interface="Wireless Network Connection"
But i can't keep my need.
I need some steps to creating a profile for ad hoc (this ad hoc was created by other machine ),or should i use other methods by using cmd ?
Answer
1- create an XML file and copy/past these lines:
{SSID}
{SSID}
ESS
auto
WPA2PSK
AES
false
passPhrase
false
{password}
xmlns="http://www.microsoft.com/networking/WLAN/profile/v3">
false
2- replace the keywords {SSID} (occurs two times) and {password} with the desired values
3- call that file in cmd (navigate first to its location):
netsh wlan add profile filename="file_name.xml"
4- then execute this command:
netsh wlan connect name="SSID"
NB: the same SSID used in XML file!
and boom, it will connect!
Note:
1- Pay attention to spelling the SSID (uppercase and lowercase letters)
2- SSID = "hotspot name"

No comments:
Post a Comment