Code clean-up
This commit is contained in:
parent
dfed4cb19d
commit
2d23832f9c
@ -3,8 +3,14 @@ using Microsoft.Win32;
|
||||
|
||||
namespace DerpingDrivers.Util
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility class for interaction with Code Integrity Policy settings.
|
||||
/// </summary>
|
||||
public static class CodeIntegrityPolicyHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets whether the kernel allows loading of "traditional" cross-signed drivers.
|
||||
/// </summary>
|
||||
public static bool WhqlDeveloperTestMode
|
||||
{
|
||||
get
|
||||
@ -12,9 +18,7 @@ namespace DerpingDrivers.Util
|
||||
var value = (int?) Registry.GetValue(@"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\CI\Policy",
|
||||
"WhqlDeveloperTestMode", null);
|
||||
|
||||
if (value == null) return false;
|
||||
|
||||
return value > 0;
|
||||
return (value.HasValue && value.Value > 0);
|
||||
}
|
||||
|
||||
set => Registry.SetValue(@"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\CI\Policy",
|
||||
|
Loading…
Reference in New Issue
Block a user