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?

2
  • From my understanding Visual Studio by default is alway ran in administrator mode. What problem are you trying to solve exactly?
    – Ramhound
    Aug 23, 2012 at 12:27
  • In windows 8.1 VS2010 does not automatically run as admin in a vanilla setup. When not run as admin some functionality is disabled e.g. ability to attach to some processes.
    – morechilli
    Mar 2, 2016 at 11:02

4 Answers 4

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.

3
  • 1
    And don't forget to go through all steps in the troubleshooter and save the changes.
    – altumano
    Feb 13, 2014 at 12:50
  • Does this also work for explorer?
    – Ray
    Apr 22, 2014 at 8:37
  • If you mess up your compatibility settings using this method you can revert them back with NirSoft's AppCompatibilityView freeware program. You can also use this tool to add compatibility settings if you'd like. Mar 29, 2023 at 13:43
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.
5
  • Would be nice if this answer had more information from the article in question.
    – Ramhound
    Aug 24, 2012 at 16:13
  • You can down vote me, but the answer I provided answers the question and works. Since you clearly read the link provided but had a problem with it, here's the missing information from it for the other solution: 1.Right click on the "Metro" Icon for Visual Studio 2012 2.Click "Open File Location". It will put you into the classic windows desktop with the shortcut for Visual Studio. 3.Right-Click on that shortcut and go to "Properties" 4.Click "Advanced" 5.Check "Run as Administrator" and click OK.
    – b.pell
    Aug 27, 2012 at 16:58
  • This was the best solution. Oct 31, 2012 at 17:02
  • Awesome answer - just used it for VS2008. Thanks so much. Nov 12, 2012 at 1:49
  • Those steps ("solution 1") did not solve the problem for me. Tried Zyumar's solution and it worked.
    – altumano
    Feb 13, 2014 at 11:38
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.

3
  • This also appears to work today with VS2015. I did however have to add the Registry Key "Layers", since it did not exist.
    – Eris
    Feb 16, 2016 at 20:25
  • I can see that some values already exist under "Layers". Some of them have a value of ^ RUNASADMIN, others are set to ~ RUNASADMIN. I am wondering what these special symbols mean. Feb 24, 2016 at 13:19
  • For Windows 10 this is the only way to do it - the Compatibility Wizard approach no longer works :(
    – Ian
    Apr 25, 2016 at 9:52
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .