title: How to get registry write permissions in C#
body: <p>I'm trying to write to the windows registry at HKEY_CURRENT_USER\Software\appname however I keep getting a permissions error when I attempt to write to the key, I have added the following to my assembly:</p>
  
  <pre><code>[assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum, Write = @"HKEY_CURRENT_USER\\Software")]
  </code></pre>
  
  <p>but this has not resolved the issue, is there something else that I should be doing?</p>