title: Getting VB6 app to run with administrator priviliges from manifest
body: <p>I have a VB6 app that manipulates files in ProgramData folder Win7. It does fine with files that it creates but any files that were initially installed, it cannot delete. I feel there may be more issues unless the program can run as administrator.</p>
  
  <p>I have tried putting a TrustInfo section into its manifest but a message appears....'The requested operation requires elevation.'</p>
  
  <p>The manifest includes...</p>
  
  <pre><code>&lt;trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"&gt;
      &lt;security&gt;
        &lt;requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"&gt;
          &lt;requestedExecutionLevel  level="requireAdministrator" uiAccess="false" /&gt;
        &lt;/requestedPrivileges&gt;
         &lt;/security&gt;
    &lt;/trustInfo&gt;
  </code></pre>
  
  <p>Any idea how to give it the required 'elevation' please?
  After more research it seems correct that ProgramData is the folder to use in Win7, but all the files installed need administer permission to delete (whether the setup.exe is run as or not as Administrator).</p>
  
  <p>Out of interest I compared the Security Properties of a file that was installed, with a file that the App subsequently created. The installed file had SYSTEM and Administrators with full permissions and Users with only Read and Execute.
  The created file had an extra object, my account, with full permissions. That sounds logical, so I added my account, with full permissions, to one of the installed files, expecting the App to be able to delete it. Then, as expected I can delete the file manually in Explorer with, no permission required. But the app still cannot delete it! 
  So then I changed the Users permissions for the installed file to full permissions, the App still cannot delete it!
  So then I changed to Owner of the file in Advanced, first to Users, then to my account. Still the app cannot delete it.
  Now there does not seem to be any difference between the security settings of the installed file and the app created file, both have same permissions and same owner.</p>
  
  <p>So if I compare the Advanced Security settings there are still some differences between to two files. The installed file has 2 extra 'not inherited' entries in permissions for my account and Users. Even if I remove the Users entry in Advanced (which is still only Read access) the app still cannot delete.</p>
  
  <p>I'm left wondering if this a VB6 problem and should I just leave the app in its old install folder where it can do what it likes with its own files!!</p>