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();
}
}C#启动其它程序
最新推荐文章于 2023-12-18 14:05:19 发布
1312

被折叠的 条评论
为什么被折叠?



