Skip to content

Commit c908caa

Browse files
committed
Use OpenRegKey
1 parent a16e807 commit c908caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shadowsocks-csharp/Util/Util.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public static bool IsSupportedRuntimeVersion()
258258
const int minSupportedRelease = 394802;
259259

260260
const string subkey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\";
261-
using (var ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(subkey))
261+
using (var ndpKey = OpenRegKey(subkey, false, RegistryHive.LocalMachine))
262262
{
263263
if (ndpKey?.GetValue("Release") != null)
264264
{

0 commit comments

Comments
 (0)