Skip to content

Commit

Permalink
Remove call to obsolete CAS API
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed Feb 4, 2024
1 parent a7ecfdc commit 23dbd8d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ public string Name
string fullRegKey = String.Format("SYSTEM\\CurrentControlSet\\Enum\\{0}\\Device Parameters", regKey);

// now try and slam dunk our new name in there - this requires the app to be running as Administrator or equivalent
System.Security.Permissions.RegistryPermission rp = new System.Security.Permissions.RegistryPermission(System.Security.Permissions.PermissionState.Unrestricted);
rp.Demand();
// System.Security.Permissions.RegistryPermission rp = new System.Security.Permissions.RegistryPermission(System.Security.Permissions.PermissionState.Unrestricted);
// rp.Demand();
Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(fullRegKey, true);
if (null == rk) {
Debug.WriteLine("!! set_Name failed to open key");
Expand Down

0 comments on commit 23dbd8d

Please sign in to comment.