RegistryKey extsubkey = Registry.ClassesRoot.OpenSubKey(".doc"); string extdefaultvalue = extsubkey.GetValue(null) as string; //if (extdefaultvalue.Equals("exefile", StringComparison.OrdinalIgnoreCase)) //扩展名类型是可执行文件 //{ RegistryKey exefilesubkey = Registry.ClassesRoot.OpenSubKey Read More