各位高手们,7-zip压缩包能检测它是否正常吗?也就是能正常解压 各位高手们,7-zip压缩包能检测它是否正常吗?也就是能正常解压 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 参考http://blog.csdn.net/wbloveilove/article/details/7879362 c#调用7z压缩和解压缩文件 http://www.cnblogs.com/qanholas/archive/2011/10/03/2198487.html 7Z命令行 //解压 public bool DoUnPack() { bool r = false; string strR = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "update"; Console.WriteLine("开始解压......"); RegistryKey reg; string rarPath; Process process = new Process(); try { reg = Registry.ClassesRoot.OpenSubKey(@"Applications\WinRar.exe\Shell\Open\Command"); rarPath = reg.GetValue("").ToString(); rarPath = rarPath.Substring(1, rarPath.Length - 7); process.StartInfo.FileName = rarPath; process.StartInfo.CreateNoWindow = true; process.StartInfo.UseShellExecute = false; // -0+ 如果已经存在则覆盖 process.StartInfo.Arguments = string.Format(" x -o+ {0} {1}", strR, Application.StartupPath);//这里是命令行请参考winrar的说明 //开始解压 process.Start(); while (!process.HasExited) { } //进程终止 if (process.HasExited) { int exitCode = process.ExitCode; if (exitCode == 0) { Console.WriteLine("{0} 正常完成", exitCode.ToString()); r= true; } else { Console.WriteLine("{0} 正常完成", exitCode.ToString()); } } Console.WriteLine("解压完成"); return r; } catch (Exception ex) { throw ex; } //这里就是解压错误 finally { //释放资源 process.Close(); } } 如何把邮件地址按下面方法加密转换 windows窗体中treeview的3个问题 最新文件夹 读取文件名? 在窗体A中有变量txt,我要赋给窗体B中的textbox控件的text属性,怎么做? C#里的集合的问题 求助 询问关于一个设计模式的问题 为什么处理事件时要签名事件处理函数?? 求字符串格式化语句? 请问C#如何模似人工操作WEB页?比如在文本框中输入,按扭响应等? C#设计界面(office2003,VS.net IDE,OutLook )界面的实现??? asp.net的服务器控件怎么获取控件值 c# Socket局域网广域网通讯。来大神解答...............
http://blog.csdn.net/wbloveilove/article/details/7879362 c#调用7z压缩和解压缩文件 http://www.cnblogs.com/qanholas/archive/2011/10/03/2198487.html 7Z命令行
//解压 public bool DoUnPack() { bool r = false; string strR = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "update"; Console.WriteLine("开始解压......"); RegistryKey reg; string rarPath; Process process = new Process(); try { reg = Registry.ClassesRoot.OpenSubKey(@"Applications\WinRar.exe\Shell\Open\Command"); rarPath = reg.GetValue("").ToString(); rarPath = rarPath.Substring(1, rarPath.Length - 7); process.StartInfo.FileName = rarPath; process.StartInfo.CreateNoWindow = true; process.StartInfo.UseShellExecute = false; // -0+ 如果已经存在则覆盖 process.StartInfo.Arguments = string.Format(" x -o+ {0} {1}", strR, Application.StartupPath);//这里是命令行请参考winrar的说明 //开始解压 process.Start(); while (!process.HasExited) { } //进程终止 if (process.HasExited) { int exitCode = process.ExitCode; if (exitCode == 0) { Console.WriteLine("{0} 正常完成", exitCode.ToString()); r= true; } else { Console.WriteLine("{0} 正常完成", exitCode.ToString()); } } Console.WriteLine("解压完成"); return r; } catch (Exception ex) { throw ex; } //这里就是解压错误 finally { //释放资源 process.Close(); } }