-1
我发现automaticaly启动WiFi热点的批处理文件的程序,所以我需要在Visual Studio使程序运行该批处理文件如何创建运行批处理文件
Execute batch-file to start wifi hotspot as admin
我发现automaticaly启动WiFi热点的批处理文件的程序,所以我需要在Visual Studio使程序运行该批处理文件如何创建运行批处理文件
Execute batch-file to start wifi hotspot as admin
// Start the child process.
Process p = new Process();
// Redirect the output stream of the child process.
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "YOURBATCHFILE.bat";
p.Start();
// Do not wait for the child process to exit before
// reading to the end of its redirected stream.
// p.WaitForExit();
// Read the output stream first and then wait.
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
代码来自MSDN。
只需编写包含这行代码的程序:
System.Diagnostics.Process.Start("c:\\batchfilename.bat");
如果您belonings工作。
你真正的问题是什么?你有什么尝试?你链接的答案有什么问题?目前尚不清楚你实际要求的是什么。 – EJoshuaS