Use OpenRegKey

This commit is contained in:
noisyfox
2016-11-06 01:25:22 +11:00
parent a16e80743c
commit c908caa584
+1 -1
View File
@@ -258,7 +258,7 @@ namespace Shadowsocks.Util
const int minSupportedRelease = 394802;
const string subkey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\";
using (var ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(subkey))
using (var ndpKey = OpenRegKey(subkey, false, RegistryHive.LocalMachine))
{
if (ndpKey?.GetValue("Release") != null)
{