c#调用winrar解压缩文件代码分享
复制代码 代码如下: using Microsoft.Win32; using System.Diagnostics; 压缩 string the_rar; RegistryKey the_Reg; object the_Obj; string the_Info; ProcessStartInfo the_StartInfo; Process the_Process; try { the_Reg = Registry.ClassesRoot.OpenSubKey(@"ApplicationsWinRAR.exeShellOpenCommand"); 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 " + " test.rar " + " " + @"C:testtest.txt"; the_StartInfo = new ProcessStartInfo();
解压缩 复制代码 代码如下: string the_rar; RegistryKey the_Reg; object the_Obj; string the_Info; ProcessStartInfo the_StartInfo; Process the_Process; try { the_Reg = Registry.ClassesRoot.OpenSubKey(@"ApplicationsWinRAR.exeShellOpenCommand"); 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 " + " test.rar " + @"C:test"; the_StartInfo = new ProcessStartInfo();
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |