C# Run application with administrator permission

  1. Select your project
  2. Alt+Enter(view Attribute)
  3. Off ClickOnce Security
  4. Open app.minifest which is created
  5. delete this code

delete <requestExcutionLevel level=”asInvoker” uiAccess=”false”/>

Add this code!!!!

<requestExcutionLevel level=”highestAvailable” uiAccess=”false”/>

That’s all!