Seams that you are looking for Process Class
. Info from MSDN:
Provides access to local and remote processes and enables you to start and stop local system processes.
using System;
using System.Diagnostics;
using System.ComponentModel;
namespace MyProcessSample
{
class MyProcess
{
public static void Main()
{
Process myProcess = new Process();
try
{
myProcess.StartInfo.UseShellExecute = false;
// You can start any process, HelloWorld is a do-nothing example.
myProcess.StartInfo.FileName = "C:\\HelloWorld.exe";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
// This code assumes the process you are starting will terminate itself.
// Given that is is started without a window so you cannot terminate it
// on the desktop, it must terminate itself or you can do it programmatically
// from this application using the Kill method.
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
Added after comment.
The simplest way to execute command probably is static method Start(String) of Process class or the other one Start(String, String) that executes application with arguments.
Process.Start("application.exe");
or
Process.Start("application.exe", "param1 param2");
The above example gives you more flexibility. E.g. using ProcessStartInfo Class as a parameter to Start
method that can redirect an input or output for console applications.