title: VB.NET Program App run as administrator
body: <p>I have a VB.NET app that works ok but when I need to save to a file, I get the Denied access to folder because my app is not running as an administrator.</p>
  
  <p>I have tried everything on the NET but my app STILL will not run as administrator.</p>
  
  <p>Things I have done:</p>
  
  <ul>
  <li>Added manifest file to my app with the <code>&lt;requestedExecutionLevel level="requireAdministrator" uiAccess="false" /&gt;</code></li>
  <li>Created a setup program to add the RUNASADMIN entry in the Registry</li>
  </ul>
  
  <p>But to no avail. Basically my app needs to be setup somehow to save to local files in the program's folder.</p>
  
  <p>Any ideas on how I fix this?</p>
  
  <pre><code>&lt;trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"&gt;
  &lt;security&gt;
    &lt;requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"&gt;
      &lt;!-- UAC Manifest Options
          If you want to change the Windows User Account Control level replace the 
          requestedExecutionLevel node with one of the following.
  
      &lt;requestedExecutionLevel  level="asInvoker" uiAccess="false" /&gt;
      &lt;requestedExecutionLevel  level="requireAdministrator" uiAccess="false" /&gt;
      &lt;requestedExecutionLevel  level="highestAvailable" uiAccess="false" /&gt;
  
          Specifying requestedExecutionLevel node will disable file and registry virtualization.
          If you want to utilize File and Registry Virtualization for backward 
          compatibility then delete the requestedExecutionLevel node.
      --&gt;
      &lt;requestedExecutionLevel level="requireAdministrator" uiAccess="false" /&gt;
    &lt;/requestedPrivileges&gt;
  &lt;/security&gt;
  </code></pre>
  
  <p></p>