c#判断某个程序是否在运行问题内容

View Code
protected bool checkWinWAR()
{
try {
using (Process unrar = new Process())
{
unrar.StartInfo.FileName = "ProcessName";
if (unrar == null)
{

//提示不存在
return false;
}
}
return true;
}
catch {
return false;
}

}


在上次压缩文件会用到相对应的解压缩文件,会判断是否已安装解压缩软件,上面的方法可以判读是否装有安装

应该还有其他的方法,暂时没有找到

posted @ 2011-12-27 09:56  Dzs  阅读(243)  评论(0编辑  收藏  举报