asp.net 压缩解压缩zip文件(13)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-01 14:20 点击:次
public void EnZip(string zipname, string zippath, string dirpath)
{
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 = " a " + zipname + " " + zippath;
the_StartInfo = new ProcessStartInfo();
the_StartInfo.FileName = the_rar;
the_StartInfo.Arguments = the_Info;
the_StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
the_StartInfo.WorkingDirectory = dirpath;
the_Process = new Process();
the_Process.StartInfo = the_StartInfo;
the_Process.Start();
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
/// <summary>
/// 解压缩
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>