Sunday, 6 March 2016

How to force .NET Application to run as administrator on Windows

If we want application force to run as Administrator  on windows, how we can do that
following i have describe how we can do this for .Net application.


1. First we need to add a new Application Manifest file your .Net project.In the Project, Right click      on the solution and click “Add new Item” and then add Manifest file




2. Then need to change In  Manifest File, modify the <requestedExecutionLevel> to <requestedExecutionLevel level=”requireAdministrator” uiAccess=”false” />



Now  user starts the application, user will prompted with the UAC and on accepting the program will run the admini mode.



No comments:

Post a Comment

Single Responsibility Principle (SRP)