using System.Diagnostics;
ExecuteCmdCommand("netsh wlan show profile");
ExecuteCmdCommand("netsh wlan show profile name={profile} key=clear");
ExecuteCmdCommand("cmd /k");
static void ExecuteCmdCommand(string command)
Process process = new Process();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.Arguments = "/c " + command;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.CreateNoWindow = true;
string output = process.StandardOutput.ReadToEnd();
Console.WriteLine(output);