From 4e58a588f12565c171320236e66903d89fe8eb38 Mon Sep 17 00:00:00 2001 From: fyr77 Date: Wed, 19 Aug 2020 19:35:21 +0200 Subject: [PATCH] add IsDCH function --- EnvyUpdate/Util.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs index 6f2be10..015b6fd 100644 --- a/EnvyUpdate/Util.cs +++ b/EnvyUpdate/Util.cs @@ -11,6 +11,7 @@ using System.Xml; using System.Xml.Linq; using System.Text.RegularExpressions; using System.Runtime.InteropServices; +using Microsoft.Win32; namespace EnvyUpdate { @@ -368,5 +369,10 @@ namespace EnvyUpdate return result; } + public static bool IsDCH() + { + RegistryKey nvlddmkm = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\services\nvlddmkm", true); + return nvlddmkm.GetValueNames().Contains("DCHUVen"); + } } } \ No newline at end of file