Skip to content

Commit

Permalink
Fix exception on registry write
Browse files Browse the repository at this point in the history
  • Loading branch information
NateShoffner committed Jun 23, 2018
1 parent 92a3aa1 commit 65ab4e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DisableNvidiaTelemetry/Model/TelemetryRegistryKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ namespace DisableNvidiaTelemetry.Model
{
internal class TelemetryRegistryKey : ITelemetry
{


private readonly string _subKeyPath;

public Dictionary<string, RegistryValuePair> ValueData;
Expand All @@ -19,7 +21,7 @@ public TelemetryRegistryKey(RegistryKey baseKey, string subKeyPath, Dictionary<s

private RegistryKey BaseKey { get; }

public RegistryKey SubKey => BaseKey.OpenSubKey(_subKeyPath);
public RegistryKey SubKey => BaseKey.OpenSubKey(_subKeyPath, RegistryKeyPermissionCheck.ReadWriteSubTree);

public string Name => $"{BaseKey.Name}\\{_subKeyPath}";

Expand Down

0 comments on commit 65ab4e2

Please sign in to comment.