public static void runScript(string fileName, string arguments)
{
Process p = new Process();
try
{
p.StartInfo.FileName = fileName;
p.StartInfo.Arguments = arguments;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = false;
p.StartInfo.RedirectStandardOutput = false;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = false;
p.Start();
p.WaitForExit();
}
finally
{
p.Close();
}
}






