title: DeleteSubKey UnauthorizedAccessException
body: <p>I'm trying to write a quick app to modify some registry keys.  When I'm browsing via RegEdit, I can modify and delete the keys with no problems.</p>
  
  <p>But when I try to use <code>RegistryKey.DeleteSubKey()</code> it throws an <code>UnauthorizedAccessException</code>.</p>
  
  <p>Is there any way to gain the privileges to do this? Also, why would there be a problem if my user account obviously has access to make the changes?</p>
  
  <p>Edit:</p>
  
  <p>Here's some code</p>
  
  <pre><code>RegistryKey reg;
  
  try
  {
      reg = Registry.CurrentUser.OpenSubKey(BaseKey);
      reg.DeleteSubKey("{" + Item.Guid.ToString() + "}");
  }
  catch
  {
      return false;
  }
  </code></pre>