我一直在努力想出一种使用C#查询WiFi信息的理想方法。我尝试过netsh方法,但不确定如何分离信息。我注意到Vistumbler使用netsh。有没有办法让这些开发人员在查询netsh时分离信息,或者他们只是执行了大量的字符串操作来删除不相关的内容。
发布于 2011-11-26 06:22:15
这是我通常做的事情。调用netsh,获取并解析输出。
Process p = new Process();
p.StartInfo.FileName = "netsh.exe";
p.StartInfo.Arguments = "netsh arguments...";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.Start();
string output = p.StandardOutput.ReadToEnd();
// parse output and look for resultshttps://stackoverflow.com/questions/8274730
复制相似问题