日期:2014-05-17 浏览次数:21242 次
public Process ProcessStart(string fileName, string command=null)
{
try
{
Process process = new Process();
process.StartInfo.FileName = fileName;
process.StartInfo.Arguments = command;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = false;
process.Start();
return process;
}
catch (Exception ex)
{
throw (ex);
}
}