title: Change executable compatibility with code
body: <p>I have a file <code>MyUtilities.exe</code>. </p>
  
  <p>When I run:
  <code>Process.Start("MyUtilities.exe","SomeParameter");</code>  </p>
  
  <p>the exit code of that process is 0 (OK) if it is run WITHOUT admin privileges. If I run that code as an administrator exit code is 1!</p>
  
  <p>Since I did not create <code>MyUtilities.exe</code> I cannot modify it.</p>
  
  <p><strong>In the end I need to run <code>Process.Start("MyUtilities.exe","SomeParameter");</code> as an administrator</strong> And have it return an exit code = 0. The way I managed to do that was by changing its compatibility to:</p>
  
  <p><img src="https://i.stack.imgur.com/xoRvc.png" alt="enter image description here"></p>
  
  <p><em>(Right click on the file->Properties->Compatibility->Run this program as an administrator)</em></p>
  
  <p>after changing that now I am able to run <code>Process.Start("MyUtilities.exe","SomeParameter");</code> as an administrator and have it return an exit code of 0.</p>
  
  <p><strong>So my question is</strong> how can I change the compatibility of that file <strong>with code</strong> so that I don't have to tell users to right click on the file then change the settings.</p>