C# 开启WIFI 代码
//运行就假死~~怎么回事Processp=newProcess();p.StartInfo.FileName="cmd.exe";p.StartInfo.UseShel...
//运行就假死~~怎么回事
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardInput.WriteLine("netsh wlan set hostednetwork mode=allow ssid=" + name.Text + " key=" + pass.Text);
p.StandardInput.WriteLine("netsh wlan start hostednetwork");
string strRst = p.StandardOutput.ReadToEnd();
txt1.Text = strRst; 展开
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardInput.WriteLine("netsh wlan set hostednetwork mode=allow ssid=" + name.Text + " key=" + pass.Text);
p.StandardInput.WriteLine("netsh wlan start hostednetwork");
string strRst = p.StandardOutput.ReadToEnd();
txt1.Text = strRst; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询