C# wifi

using System;
using System.Diagnostics;

namespace WifiTest
{
class Program
{
static void Main(string[] args)
{
Process proc = new Process();
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.FileName = "netsh";
proc.StartInfo.Arguments = "wlan show networks mode=bssid";
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
proc.Start();
string output = proc.StandardOutput.ReadToEnd();
proc.WaitForExit();

Console.WriteLine(output);
Console.Read();
}
}
}

posted @ 2015-05-12 15:05  伟大的厨师  阅读(231)  评论(0编辑  收藏  举报