How can I make that when I run my application thorugh the VS it will prompt for admin rights?
<p>I can do it in the application <code>Debug/Bin</code> directory to change the exe file of my application property to <code>Run As Admin</code>.</p>

<p>But I want it to run as admin also when I'm running it through Visual Studio.</p>

<p>So I created a manifest file which I put it in the <code>debug/bin</code> directory of my application and I also have there <code>mt.exe</code></p>

<p>My manifest file content:</p>

<pre><code>Executable: hardwareMonitoring.exe 
Manifest:Hardwaremonitoring.exe.manifest
Sample application manifest file:
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"&gt; 
  &lt;assemblyIdentity version="1.0.0.0"
     processorArchitecture="X86"
     name="IsUserAdmin"
     type="win32"/&gt; 
  &lt;description&gt;Description of your application&lt;/description&gt; 
  &lt;!-- Identify the application security requirements. --&gt;
  &lt;trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"&gt;
    &lt;security&gt;
      &lt;requestedPrivileges&gt;
        &lt;requestedExecutionLevel
          level="requireAdministrator"
          uiAccess="false"/&gt;
        &lt;/requestedPrivileges&gt;
       &lt;/security&gt;
  &lt;/trustInfo&gt;
&lt;/assembly&gt;
</code></pre>

<p>Now I think I need to use the <code>mt.exe</code> somehow or need to add/embed the manifest into my project? The idea is that not it will create automatic on my hard disk in <code>Debug/Bin</code> a exe file which is already in <code>Admin Rights (Run As Admin)</code> but I want it to prompt for admin right confirmation when I'm running the application in Visual Studio 2010.</p>
