asp.net 压缩解压缩zip文件(14)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-01 14:20 点击:次
/// </summary>
/// <param name="zipname">要解压的文件名</param>
/// <param name="zippath">要解压的文件路径</param>
public void DeZip(string zipname, string zippath)
{
try
{
the_Reg = Registry.ClassesRoot.OpenSubKey(@"Applications\WinRar.exe\Shell\Open\Command");
the_Obj = the_Reg.GetValue("");
the_rar = the_Obj.ToString();
the_Reg.Close();
the_rar = the_rar.Substring(1, the_rar.Length - 7);
the_Info = " X " + zipname + " " + zippath;
the_StartInfo = new ProcessStartInfo();
the_StartInfo.FileName = the_rar;
the_StartInfo.Arguments = the_Info;
the_StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
the_Process = new Process();
the_Process.StartInfo = the_StartInfo;
the_Process.Start();
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>