c# silent execute exe
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "netsh";
psi.UseShellExecute = false;
psi.RedirectStandardError = true;
psi.RedirectStandardOutput = true;
psi.Arguments = "SOME_ARGUMENTS";
Process proc = Process.Start(psi);
proc.WaitForExit();
string errorOutput = proc.StandardError.ReadToEnd();
string standardOutput = proc.StandardOutput.ReadToEnd();
if (proc.ExitCode != 0)
throw new Exception("netsh exit code: " + proc.ExitCode.ToString() + " " + (!string.IsNullOrEmpty(errorOutput) ? " " + errorOutput : "") + " " + (!string.IsNullOrEmpty(standardOutput) ? " " + standardOutput : ""));
Also in C#:
- two players one phone unity gamne
- count the number of notes in a given amount c#
- unity mobile controls
- how to use K2 games Games parallax background
- call stored proc c#
- waitforseconds unity
- c# graphics draw filled rectangle
- unity 2d enemy field of view
- parsing string to int c#
- unity random int
- c# reverse list
- c# only letters
- c# clear console read chache
- Celsius to Fahrenheit c#
- populate combobox from array c#
- convert string to datetime c#
- C# array to label
- mvc input type file
- c# use hashtable check if key exists
- wpf label text in center
- const float c#
- c# merge two xml files
- if else statement
- c# trim string