I have the following code to connect to wi-fi, which works fine.
Dim p = "netsh.exe"
Dim wi-fi-name as string = "My-Wi-Fi-Connection"
Dim sInfo As New ProcessStartInfo(p, "wlan connect " & wi-fi-name)
sInfo.CreateNoWindow = True
sInfo.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(sInfo)
For i As Integer = 0 To 100
Application.DoEvents()
System.Threading.Thread.Sleep(10)
Next
I want to be able to turn it off, changing connect to disconnect does not work.
Any suggestions much appreciated