Found a way to disconnect from wlan, using win7

Jul 10, 2013 at 7:38 AM
Hello out ther!

I am using this great API, i use it to check wireless sticks.
For that i needed my app to disconnect from network before the next stick can be tested.

And i found a way to disconnect:

Win7 includes an intuitive GUI that allowes you to take control of wlan networks:
(http://www.nextofwindows.com/how-to-manage-a-wireless-wifi-network-from-the-command-line-in-windows-7/)

I used the command to disconnect from my network:
            System.Diagnostics.Process process = new System.Diagnostics.Process();
            System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
            startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
            startInfo.FileName = "cmd.exe";
            startInfo.Arguments = "/C netsh wlan disconnect";
            process.StartInfo = startInfo;
            process.Start();
Maybe someone can use it too.
Regards
Feb 23, 2015 at 3:28 AM
This is the way to add a disconnect function to managedwifi: http://managedwifi.codeplex.com/discussions/34405