Make Jumplist Shortcut Always Run Application as Administrator

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?


Solution 1:

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).

Solution 2:

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.