From LedHed's Wiki
Jump to: navigation, search
(Created page with "Some times you need your application to launch with elevated permissions (UAC). <br> This can be accomplished by changing the following line in your .NET Projects '''app.manif...")
 
 
Line 1: Line 1:
 
Some times you need your application to launch with elevated permissions (UAC). <br>
 
Some times you need your application to launch with elevated permissions (UAC). <br>
 +
 
This can be accomplished by changing the following line in your .NET Projects '''app.manifest''' file:
 
This can be accomplished by changing the following line in your .NET Projects '''app.manifest''' file:
 
  <requestedExecutionLevel level="asInvoker" uiAccess="false" />
 
  <requestedExecutionLevel level="asInvoker" uiAccess="false" />
 
to
 
to
 
  <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
 
  <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
 
+
NOTE:  You can open the app.manifest in the code editor by going to your projects properties, then selecting '''Application''' and clicking the '''View Windows Settings''' button.
  
  

Latest revision as of 08:25, 4 March 2015

Some times you need your application to launch with elevated permissions (UAC).

This can be accomplished by changing the following line in your .NET Projects app.manifest file:

<requestedExecutionLevel level="asInvoker" uiAccess="false" />

to

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

NOTE: You can open the app.manifest in the code editor by going to your projects properties, then selecting Application and clicking the View Windows Settings button.


Reference

http://stackoverflow.com/questions/90674/how-does-a-program-ask-for-administrator-privileges