Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# execute shell command

System.Diagnostics.ProcessStartInfo process = new System.Diagnostics.ProcessStartInfo();
process.UseShellExecute = false;
process.WorkingDirectory = worikng_path;
process.FileName = command;
process.Arguments = command_arguments;
process.RedirectStandardOutput = true;

System.Diagnostics.Process cmd =  System.Diagnostics.Process.Start(process);
// waiting to complete 
cmd.WaitForExit();
 
PREVIOUS NEXT
Tagged: #execute #shell #command
ADD COMMENT
Topic
Name
3+1 =