Skip to content

Commit

Permalink
Ensure Licensed & Whql settings are also correctly set
Browse files Browse the repository at this point in the history
  • Loading branch information
gus33000 committed Jan 29, 2023
1 parent 67f3c6e commit 2a0b38b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions DriverUpdater/CksLicensing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public void SetLicensedState()
FileMode.Open,
FileAccess.ReadWrite
), DiscUtils.Streams.Ownership.Dispose);

RegistryKey key = hive.Root.OpenSubKey("ControlSet001\\Control\\ProductOptions");
byte[] value = (byte[])key.GetValue("ProductPolicy");

Expand Down Expand Up @@ -125,6 +126,12 @@ public void SetLicensedState()
{
key.SetValue("ProductPolicy", value);
}

key = hive.Root.OpenSubKey("ControlSet001\\Control\\CI\\Protected");
key.SetValue("Licensed", 0x00000001);

key = hive.Root.OpenSubKey("ControlSet001\\Control\\CI\\Policy");
key.SetValue("WhqlSettings", 0x00000001);
}
catch
{
Expand Down

0 comments on commit 2a0b38b

Please sign in to comment.