!!!!!!!进程无法关闭(请高人指点)!!!!!!
如题
public bool IsRun( string exeName )
{
string isrunning = "0";
Process[] myProcesses = Process.GetProcesses(Server.MachineName);
foreach(Process myProcess in myProcesses)
{
if ( myProcess.ProcessName == exeName )
{
isrunning = "1";
getrun="1";
break;
}
}
if ( isrunning == "1" || getrun == "0")
{
return true;
}
else
{
return false;
}
}