Make Jumplist Shortcut Always Run Application as Administrator

16

3

I have Visual Studio 2010, for instance, pinned to my taskbar. I have pinned a solution to it so I can just right-click the VS icon and then choose my solution to fire it up (e.g. from the Jumplist). However, this opens VS in non-administrator mode (which can't access the IIS metabase).

So I have to open VS first and then open my solution.

I know the pinned taskbar app shortcuts are stored at %APPDATA%\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar, but what about the files that are pinned to those shortcuts?

How can I make the solution shortcut (in Jumplist), which is pinned to the VS icon, open VS in administrator mode?

Josh M.

Posted 2012-10-02T11:07:48.510

Reputation: 1 322

techie007: not quite - that works fine, launching the pinned SLN is what is opening VS in non-admin mode. Thanks though. – Josh M. – 2012-10-02T12:01:25.207

Can you just go to "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" and mark it to always launch as Administrator? – Ganesh R. – 2012-10-02T12:58:39.083

@GaneshR.: I tried, but devenv.exe does not have a Compatibility tab. – Josh M. – 2012-10-02T13:08:29.760

Answers

18

See "Option 7" on the following page: http://www.eightforums.com/tutorials/9564-run-administrator-windows-8-a.html

Using the registry, you can set the application to always run as administrator. This solved the jump-list issue for me.

To Set "Run as administrator" in Registry Editor

  1. In Regedit, locate the key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers.
  2. Add a new String value (or edit the existing one) with the name set to the path to the executable (e.g. for VS2012: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe).
  3. Set the new key's value to ~ RUNASADMIN (see the link above for more options).

Wade-0

Posted 2012-10-02T11:07:48.510

Reputation: 306

2I had to add the layers key and then the value, but then it worked immediately without a restart. – stuartd – 2014-07-22T21:43:38.043

This still applies to Visual Studio 2019. – SQueek – 2019-08-22T04:30:30.207

3

You need to make the whole of VS open as admin, to do so open explorer navigate to:

C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VsLauncher.exe

Right click on it and switch to the properties tab and check the always Run this program as an administrator checkbox.

enter image description here

Then click apply to save the setting.

Taylor Gibb

Posted 2012-10-02T11:07:48.510

Reputation: 2 579

I did try to do that before on devenv.exe but there is no compatability tab in that case. I tried what you suggested on VSLauncher but it still opened in non-admin mode. – Josh M. – 2012-10-02T12:00:40.310

oh, i use this on my PC and it works fine. You are talking about opening files from explorer and jumplists right, like clicking on the .sln file ? – Taylor Gibb – 2012-10-02T12:20:49.007

1@TaylorGibb Josh M. is using Windows 8. There is some changes in Windows 8 with the Compatibility tab I suppose. – Ganesh R. – 2012-10-02T12:57:15.810