private void StartProcess(string fileName)
{
using (Process pro = new Process())
{
FileInfo file = new FileInfo(fileName);
//在windows服务里面启动其它程序,必须指定WorkingDirectory,其它情况可以不用指定。
pro.StartInfo.WorkingDirectory = file.Directory.FullName;
pro.StartInfo.FileName = fileName;
pro.StartInfo.CreateNoWindow = true;
pro.StartInfo.UseShellExecute = false;
pro.StartInfo.CreateNoWindow = true;
pro.Start();
}
}