Answers for "c# execute command line code"

C#
7

how to make c# program run cmd commands

string strCmdText;
strCmdText= "/C copy /b Image1.jpg + Archive.rar Image2.jpg";
System.Diagnostics.Process.Start("CMD.exe",strCmdText);
Posted by: Guest on May-28-2020
0

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();
Posted by: Guest on February-11-2021

Code answers related to "c# execute command line code"

C# Answers by Framework

Browse Popular Code Answers by Language