Using C# or Powershell to scan all available wireless networks and connect to a specific SSID

夙愿已清 提交于 2019-12-07 05:15:08

问题


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


来源:https://stackoverflow.com/questions/6928408/using-c-sharp-or-powershell-to-scan-all-available-wireless-networks-and-connect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!