by Andreas

Visual Studio 2012 – always run as Administrator in Windows 8

In Windows 7 it was easy to turn on “Always run as administrator” for pinned Visual Studio solutions (right clicking the icon and re-open a previous solution in Administrator mode).

In Windows 8 this has changed, and even though you turn on Administrator mode for an application you’re still not able to completely turn off UAC. The result is that if you open a Visual Studio solution directly from a pinned element, you’ll be asked to restart under different credentials when you attempt to debug:



To force every instance of Visual Studio 2012 to run under Administrator credentials, locate the devenv.exe file under

C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDE

Right click the file, choose “Troubleshoot compatibility” and select “Troubleshoot program” from the dialog box. In the next dialog ensure “The program requires additional permissions” is checked and click Next.


As soon as this is done (you’re forced to “Test program” once before you can complete the wizard) you’ll see that opening solutions by right-clicking the VS icon will now run in administrator mode.

  • Harsh Baid

    Hi good to know about this. Can you provide some information about what does it changes internally (so that I could avoid wizard and work it out myself manually) ?

    • Andreas

      Some web project types require administrator rights before you can debug, and SharePoint debug and deployment is the same. Saves you from having to “restart under difference credentials” every time you forget!