保存一段DOTNET代码
一段DOTNET代码
String the_rar;the_Reg.Close();
RegistryKey the_Reg;
Object the_Obj;
String the_Info;
ProcessStartInfo the_StartInfo;
Process the_Process;
try
{
the_Reg = Registry.ClassesRoot.OpenSubKey(@"Applications\WinRar.exe\Shell\Open\Command");
the_Obj = the_Reg.GetValue("");
the_rar = the_Obj.ToString();
the_rar = the_rar.Substring(1, the_rar.Length – 7);
int lastl = the_rar.LastIndexOf(“\\”);
the_rar = the_rar.Substring(0, lastl) + “\\rar.exe”;
//rar.exe x -o+ -x@exlist.txt rardoc 不提示覆盖解压缩 exclist.txt包含去除的文件,一行一个类型if (!_exlistPath.Equals(""))
{
the_Info = " X -o+ -x@" + _exlistPath + " " + _zipFile + " " + " " + _tagPathFile;
}
the_Info = " X -o+ " + _zipFile + " " + " " + _tagPathFile;
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;
return the_Process.Start();
Leave a Comment