This task requires the application to have elevated permissions

2011-05-16


In Windows 7 and Vista, when you run a software, you might need a permission.

When we use Visual Studio 2010, there is no problem when you run Visual Studio 2010 itself, and write code, and debug, and run your application.

However, if your application needs some permission, for example, your application need to "Run as Administrator", you can set some permission in your application. and then, no matter when you try to debug or run directly your application, you will see the following popup window:

This task requires the application to have elevated permissions

  • Restart under different credentials
  • Cancel the task and return to Microsoft Visual Studio**

VS2010Permisson0

You can follow the guide to choose "Restart under different credentials" and then your Visual Studio can run as Administrator in the second time. But, why don’t let your Visual Studio 2010 run as Administrator automatically and then you do not need to restart ?

The following show how to set Visual Studio 2010 run as administrator automatically:

1: Go to Start and choose "Microsoft Visual Studio 2010", right click it and choose "Properties"

VS2010Permisson1

2: You will see properties windows as following:

VS2010Permisson2

Choose the "Compatibility" tab page and check on "Run this program as an administrator".

Done!