From c908caa5845485aa16f971ef6e9c96b9a6216b8b Mon Sep 17 00:00:00 2001 From: noisyfox Date: Sun, 6 Nov 2016 01:25:06 +1100 Subject: [PATCH] Use OpenRegKey --- shadowsocks-csharp/Util/Util.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks-csharp/Util/Util.cs b/shadowsocks-csharp/Util/Util.cs index cfa7f5b..046d4f6 100755 --- a/shadowsocks-csharp/Util/Util.cs +++ b/shadowsocks-csharp/Util/Util.cs @@ -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) {