I have find batch file that start wifi hotspot automaticaly ,So I need to make a program in visual studio to run that batch file
Asked
Active
Viewed 37 times
0
-
What's your actual question? What have you tried? And what's wrong with the answer you link to? As it stands it's unclear what you're actually asking for. – EJoshuaS - Stand with Ukraine Jul 26 '16 at 14:35
2 Answers
0
// 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();
Code is from MSDN.

Naman Joshi
- 26
- 2
0
Simply Write a program containing this line of code:
System.Diagnostics.Process.Start("c:\\batchfilename.bat");
Should work for your belonings.