title: Can't modify existing registry key
body: <pre><code>Private POWER_HIGHPERFORMANCE As String = "6f28993d-6925-4551-a659-2140ba44e835"
  Private POWER_BALANCED As String = "381b4222-f694-41f0-9685-ff5bb260df2e"
  
  Dim RegKeyActivePowerScheme As RegistryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes", True, Security.AccessControl.RegistryRights.FullControl)
          RegKeyActivePowerScheme.SetValue("ActivePowerScheme", POWER_HIGHPERFORMANCE, RegistryValueKind.String)
          RegKeyActivePowerScheme.Close()
  </code></pre>
  
  <p>I can't modify it to high performance plan. I just get an error "The specified RegistryKeyPermissionCheck value is invalid. Parameter name: mode</p>