How to request administrator permission in Visual Basic.NET

2

I'm creating a project that accesses protected Windows folders. How do I request administrative access to the user.

    
asked by anonymous 30.01.2015 / 04:54

1 answer

1

If the entire application needs to run with elevated privileges, you do not need to make changes to the code. Just add a manifest that tells Windows that your application should be running with elevated privileges.

For this:

  • Access the project properties;
  • View Windows Settings;
  • Add the following line requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
  • 30.01.2015 / 10:52