I am trying to write a script that scans all the available wireless networks and connects to a specific network (SSID). Does anyone have a sample code written already for this? I cannot install a third party software (managed wifi api) due to some restrictions.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use netsh
:
netsh wlan connect ssid=YOURSSID name=PROFILENAME
http://www.hanselman.com/blog/HowToConnectToAWirelessWIFINetworkFromTheCommandLineInWindows7.aspx
回答2:
Check this related article: Managing wireless network connection in C# . There are some answers, as well as a link to a sample app on codeproject that connects and shows basic wireless info (signal strength, etc) using a UI.
回答3:
- wlanscan by Kris Cieslak