using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleAppTest { class Program { static void Main(string[] args) { Chilkat.Rar rar = new Chilkat.Rar(); // Note: The Chilkat RAR functionality only provides the ability // to open, list, and "unrar" (i.e. extract) RAR archives. It does // not provide the ability to create RAR archives. // Also, the Chilkat RAR functionality is free. It does not // require a license to use indefinitely. bool success; success = rar.Open("aaa.rar");//指定要解压的rar文件 if (success != true) { // MessageBox.Show(rar.LastErrorText); Console.WriteLine(rar .LastErrorText); return; } success = rar.Unrar("E:/temb/");//指定要解压的路径,该路径要存在,如果没有的话要先创建 if (success != true) { //MessageBox.Show(rar.LastErrorText); } else { //MessageBox.Show("Success."); Console.WriteLine("Success"); } Console.ReadLine(); } } } 首先需要下载http://www.chilkatsoft.com/download/ChilkatDotNet2.msi,安装后得到一个ChilkatDotNet2.dll,在你的工程里面添加引用。 上面是测试代码: