//调用,CompressNum静态变量支持同时解压上限,CompressTime解压等待时间
//立即停止关联的进程process.Kill();process.Close();
//process.StartInfo.UseShellExecute = false;
//如果 UserName 属性不为 空引用(在 Visual Basic 中为 Nothing) 或不是一个空字符串,则 UseShellExecute 必须为 false,否则调用 //Process.Start(ProcessStartInfo) 方法时将引发 InvalidOperationException
CompressNum++;
ExecuteUnzip(cmdName, arguments);
CompressNum--;
/// <summary>
/// 执行解压
/// </summary>
/// <param name="cmdName"></param>
/// <param name="arguments"></param>
public static void ExecuteUnzip(string cmdName, string arguments)
{
Process process = new Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.FileName = cmdName;
process.StartInfo.Arguments = arguments;
process.Start();
process.WaitForExit(int.Parse(CompressConfigBLL.CompressTime));
//if (!process.WaitForExit(int.Parse(CompressConfigBLL.CompressTime)))
//{
// if (!process.HasExited)
// {
// process.Kill();
// process.Close();
// }
//}
}