title: Disabling UAC programmatically - Change doesn't take effect?
body: <p>I created a C# application that changes the "EnableLUA" key to 0,
  the application is run with admin rights, and no errors pop up:</p>
  
  <pre><code>//Runs with admin rights
  try 
  {
  RegistryKey key = 
  Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", true);
              key.SetValue("EnableLUA", "0");
              key.Close();
  }
  catch(Exception e)
  {
      MessageBox.Show("Error: " + e);
  }
  </code></pre>
  
  <p>The registry key indeed gets changed from 1 to 0, but even after restarting the computer, 
  UAC is still enabled. Then when I go to Control Panel > User Account Control, the slider is turned all the way down. When pressing "Save" (and not having modified anything), UAC suddenly seems to be disabled.</p>
  
  <p>Would this be a bug of some sort or just a weird kind of security? Is there any way around this?</p>