//using System.Diagnostics;
public void RunExe(string ExeFileName, string ParaString)
{
try
{
//如果有在运行了,先干掉,然后再运行
if (ExeFileName.ToUpper().EndsWith("EXE"))
{
Process[] p = Process.GetProcessesByName(ExeFileName.Substring(0, ExeFileName.Length - 4));
foreach (Process p1 in p)
{
p1.Kill();
}
}
Process.Start(ExeFileName, ParaString);
}
catch (Exception ex)
{
MessageBox.Show("程序发生错误!");
}
}
亲爱的:被墙域名跳转TG:@qianhenetwork QQ:851617266,可否收藏+评论+分享呢?
文章评论 本文章有个评论