title: Why does a .NET File.Delete() fail with UAC and requireAdministrator=True?
body: <p>This is a driving me nuts. I have searched all over StackOverflow and read all about UAC. But I'm still running into a problem.</p>
  
  <p>Using VS 2008, I have a simple program that does nothing but this:</p>
  
  <pre><code>File.Delete("c:\windows\fonts\whatever.ttf")
  </code></pre>
  
  <p>The EXE has a proper manifest with requireAdministrator=True. When compiled, the app icon receives the shield icon. And when I launch the application, logged in as either an Admin or Standad user, I receive the "Do you want the following program to make changes..." confirmation dialog. Additionally, I use a code signing cert on the EXE.</p>
  
  <p>When running the app, I get the following behaviors:</p>
  
  <p>When I run the application when logged in as an Administrator, the file is deleted.</p>
  
  <p>However, when logged in as a Standard user, I get a UAC prompt and enter in an Admin password, but I get a "file access is denied" error when the delete executes.</p>
  
  <p>Can someone explain this to me? I thought that the requiresAdministrator=True in the manifest elevates the process. But I still can't delete a system file.</p>
  
  <p>Thanks.</p>