title: C# Process - Disable User Account Control prompt?
body: <p><strong><em>Question Background:</em></strong></p>
  
  <p>I am calling a batch file to run a specified dll against the MSTest.exe through the use of a Process object.</p>
  
  <p><strong><em>The code:</em></strong></p>
  
  <p>I want to ensure that at all times this process is run with elevated administrator permissions.</p>
  
  <p>I do this currently by setting the process <code>verb</code> property to <code>runas</code>, as shown:</p>
  
  <pre><code> try
   {
       _process.StartInfo.Verb = "runas";
       _process.StartInfo.CreateNoWindow = true;
       _process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
       _process.StartInfo.Arguments = testLocation + " " + testDll;
       _process.StartInfo.FileName = batchFileLocation;
       _process.Start();
       _process.WaitForExit();
   }
   catch (Exception ex)
   {
       throw ex;
   }
  </code></pre>
  
  <p><strong><em>The issue:</em></strong></p>
  
  <p>This runs as expected but the User Account Control (UAC) prompt asks to confirm that I wish the process to run the .exe.</p>
  
  <p>As this code is part of an an automated process I <strong><em>cannot</em></strong> have any human input to click the 'Yes' button on the prompt, <strong>how can I disable the UAC prompt?</strong></p>