RAR File Support

Feb 9, 2013 at 3:25 PM
Edited Feb 9, 2013 at 3:26 PM
Hello,
I just added rar support. In case you need it, here is the code;
using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Classes\\WinRAR\\shell\\open\\command"))
{
        //check if winrar exist
        if (registryKey != null)
        {
             string path = (string)registryKey.GetValue(null);
             path = path.Substring(1, path.Length - 7);
             string targetFolder = Application.StartupPath;
             installerCMD = String.Format("\"{2}\" X -ep -o+ -m3 \"{0}\" \"{1}\"", tempName, targetFolder, path);
         }
         else
         {
              sparkle.ReportDiagnosticMessage("Winrar couldn't be found");
         }
}