示例#1
0
        private static object GetRegisteryValueRInstallPath()
        {
            var reg = RegistryHelpers.GetRegistryKey(@"SOFTWARE\R-core\R\");

            if (reg == null)
            {
                return(null);
            }

            var path = reg.GetValue("InstallPath");

            if (path != null)
            {
                return(path);
            }

            foreach (var key in reg.GetSubKeyNames())
            {
                var subreg  = reg.OpenSubKey(key);
                var subpath = subreg.GetValue("InstallPath");
                if (subpath != null)
                {
                    return(subpath);
                }
            }

            return(null);
        }
示例#2
0
        private static object GetRegisteryValueRInstallPath()
        {
            var v = RegistryHelpers.GetRegistryValue(@"SOFTWARE\R-core\R\", "InstallPath");

            return(v);
        }