36

I've tried checking the "Run as Administrator" on the shortcut, but that doesn't always seem to work, like when I open the solution through the jumplist.

I browsed to the devenv.exe file, but when I open the properties for the file the Compatibility tab is not there. It is there for other executables in the same directory.

Does anyone know how I can get the tab back so that I can set the Run as Administrator open on the executable?

mkinkade
  • 461

5 Answers5

54

I don't know why the tab is missing, but I found a little workaround that worked for me:

Rightklick devenv.exe and choose Troubleshoot compatibility. In the new window click at Troubleshoot programm, then check The programm requires additional permission.

This forces the settings to administrator rights only, without running in compatibility mode.

Zyumar
  • 1,256
7

On VS2012 there is an extension called "VSCommands11" that you can install. One of the configuration options for it is "Always start Visual Studio with elevated permissions". This will get you want you want with 2012. Here's a link that's got a screenshot of that config dialog.

http://open-db.info/OpenDb/Article.aspx?ArticleId=106

Edit: From the above site:

summary: You want to start Visual Studio 2012 as an administrator to avoid errors such as accessing the IIS metabase.

solution 1:

  • Right click on the "Metro" Icon for Visual Studio 2012
  • Click "Open File Location". It will put you into the classic windows desktop with the shortcut for Visual Studio.
  • Right-Click on that shortcut and go to "Properties"
  • Click "Advanced"
  • Check "Run as Administrator" and click OK.
Preet Sangha
  • 1,143
b.pell
  • 286
6

I had the same issues and it took me very long time to find the solution. The trick is to add a registry key that says you want to run the Visual Studio Version selector as Administrator, not the devenv.exe itself!

From my blog post: http://daniellang.net/always-run-visual-studio-as-administrator-in-windows-8/

Go to

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

and add an entry with the name

C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe

and the value

RUNASADMIN

This will make VS launch as admin.

Indrek
  • 24,874
2

For the Compatibility tab in general, a trick that can work is to find another program that does have this tab and choose the settings you want. Then in the registry go to

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

and copy the magic string value to a new one with the name of the program you really wanted to change. I used this trick for high-dpi settings but I don't see why it wouldn't work for arbitrary compatibility settings.

Thanks to Daniel Lang's answer above, which put me on the right track.

Ed Avis
  • 488
0

For those coming to this question in 2024, there is a super easy approach now - the RunAsAdministrator Visual Studio extension. No more faffing about with compatibility.