title: c# How to run .bat file with administrator privileges from code (as manually)
body: <p>I want to start .bat file from c# code with administrator privileges. I tried to add this to app.manifest:</p>
  
  <pre><code>&lt;requestedExecutionLevel level="requireAdministrator" uiAccess="false" /&gt;
  </code></pre>
  
  <p>or this to my process start info:</p>
  
  <pre><code>psi.Verb = "runas";
  </code></pre>
  
  <p>but without success. Although the title of cmd looks like "Administrator: ..." it does not work properly as when I run the .bat file with administration privileges manually (right click -> run as admin).
  Do you have any ideas what could be the problem?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Some little code:</p>
  
  <pre><code>ProcessStartInfo sti = new ProcessStartInfo();
  sti.FileName = "myScript.bat";
  sti.Verb = "runas";
  Process.Start(sti);
  </code></pre>