Horje
c# silent execute exe Code Example
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 : ""));




Csharp

Related
unity player movement script 3d Code Example unity player movement script 3d Code Example
process which converts natural sugar into alcohol by yeast Code Example process which converts natural sugar into alcohol by yeast Code Example
mvc form name Code Example mvc form name Code Example
print out a dictionary c# Code Example print out a dictionary c# Code Example
c# words return first 20 items of array Code Example c# words return first 20 items of array Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9