命令行参数那加上-ibck指定后台运行。

string sourceFilepath = "d:\\测试.rar";

string targetFilepath = "d:\\测试";
if (!Directory.Exists(targetFilepath))
{
Directory.CreateDirectory(targetFilepath);
}
Process proc = new Process();
proc.StartInfo.FileName = "Winrar.exe";
proc.StartInfo.Arguments = "x -t -ibck -o-p " + sourceFilepath + " " + targetFilepath;
proc.Start();
proc.WaitForExit();
MessageBox.Show("解压完成!");
posted on 2018-03-20 10:33  大笨鹰  阅读(322)  评论(0编辑  收藏  举报