Windows 10: how to open application as Administrator when clicking on pinned items

17

5

I added a shortcut to the taskbar pinning it and set its properties to run as administrator. This works fine as long as I launch the application itself. Some applications (such as Visual studio 2015) add a list of recently used documents to the pinned icon, for quicker access. I notice that clicking on a recent document, my application does NOT run as administrator.

Is there a way to make the pinned application to run as administrator also when launched by clicking on a recently used item in the list that appears by right-clicking on the pinned application icon?

Thanks!

Starnuto di topo

Posted 2015-12-10T10:53:26.417

Reputation: 402

Have you tried setting the .exe itself to run as Administrator via the compatibility options? – Jonas Köritz – 2015-12-10T10:55:09.490

Unlike on Windows 7, in Windows 10 I cannot find any compatibility options in the executable properties. – Starnuto di topo – 2015-12-10T11:13:57.807

Answers

17

For Windows 10 and Visual Studio 2017, I followed the directions from other posts and it solved the issue.

Can you force Visual Studio to always run as an Administrator in Windows 8?

I imagine this works for other programs that do not have a Compatibility tab in the properties window.

  1. Right-click Visual Studio 2017 icon in the taskbar.
  2. Right-click "Visual Studio 2017" and choose "Properties"
  3. On the Shortcut tab, click "Open File Location"
  4. Right-click devenv.exe and select "Troubleshoot compatibility".
  5. Select "Troubleshoot program"
  6. Check "The program requires additional permissions"
  7. Click "Next"
  8. Click "Test the program..."
  9. Wait for the program to launch (you might be asked to run as admin, click yes)
  10. Click "Next"
  11. Select "Yes, save these settings for this program"
  12. Click "Close"

Disclaimer: as @EricHirst points out, Visual Studio will ALWAYS run as Administrator with this solution. Please weigh security concerns against convenience before implementing this change.

Rich G

Posted 2015-12-10T10:53:26.417

Reputation: 196

Great solution, should be marked as the answer. – Ian – 2017-06-29T05:50:03.443

1ha! i came here exactly for VS2017 pro! thanks man! – michael g – 2018-03-03T05:00:59.727

Why is this not the solution? – user2158153 – 2018-05-15T12:01:23.247

I don't really like this solution, for Visual Studio at least. It forces you to run as admin for everything you do in Visual Studio, which opens security holes especially if you ever pull anything open source down from the internet. Then, when you try to roll it back, you get the "Unrecognized Guid format" issue described in https://stackoverflow.com/q/39885782/2055511.

I'd like to see an answer that was specific to individual .sln files in the MRU list. I don't know if such an answer exists however.

– Eric Hirst – 2019-03-04T22:44:02.117

10

If you open the properties of the EXE itself there is an option on the compatibility tab called Run this program as an administrator. If you tick this and apply it, any new shortcuts you create from this will launch as administrator.

Screenshot of the properties window

Burgi

Posted 2015-12-10T10:53:26.417

Reputation: 5 916

1On windows 10 I haven't got this option for all programs. Although it appears for, let's say, Chrome, for other programs (e. g. Visual Studio 2015) I have only the "General", "Digital signature", "Security", "details" and "Previous version" tabs. – Starnuto di topo – 2015-12-10T13:12:45.320

1Is your computer on a domain? the available tabs might be administered through group policy or other domain function. – Burgi – 2015-12-10T13:19:01.267

Yes, I am. So that may be the cause of it: I'll ask the system administrators. Thanks! – Starnuto di topo – 2015-12-10T13:24:15.197

You can get your sysadmin to add your domain user to the "local admin" group on the local PC that should give you the required admin rights without messing about with network level security policies. – Burgi – 2015-12-10T13:27:43.760

In "Computer management", "Local users and groups", "Groups", if I double-click on "Administrators" I can see my name. Maybe the problem is somewhere else... – Starnuto di topo – 2015-12-10T13:39:35.550

@Starnutoditopo I would guess it is a Group Policy applied by your sysadmin. Did you ever get it resolved? – Burgi – 2016-02-02T15:52:24.407

I asked my sysadmins, but they didn't solved it yet, sorry. – Starnuto di topo – 2016-02-03T14:45:24.783

If you run gpresult > c:\gp.txt you can see if there are any policies that look suspect. – Burgi – 2016-02-03T14:57:47.453

The gpresult /v > c:\gp.txt command yields a more-then-150-KB-long file, containing a plenty of policies... Most are organization-level applied policy: I cannot actually understand what they are... – Starnuto di topo – 2016-02-03T15:49:14.757