title: Powershell command to change registry value in a subfolder using C#
body: <p>I am working on something that is supposed to change a registry data value. So the user clicks on a button and it changes the value. Im using C# to run the command in powershell.</p>
  
  <p>When I use this...</p>
  
  <pre><code>string script = "Set-ItemProperty -path \HKLM:\\ -name rname -value + new";
  </code></pre>
  
  <p>It changes the value in that MAIN folder without a problem but when I try to change a value in one of its SUBFOLDERS like so..</p>
  
  <pre><code>string script = "Set-ItemProperty -path \HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon -name rname -value + new";
  </code></pre>
  
  <p>It does nothing. The value doesnt change at all.</p>
  
  <p>Can someone help?</p>