How to Run Visual Studio as Administrator by defau

2019-01-03 04:07发布

Recently discovered that even while logged into my personal laptop as Admin, Visual Studio does not run in admin mode and you need to explicitly use Run As Admin

Is there a way to Make it run as Admin by default other than creating a shortcut etc. ?

14条回答
放荡不羁爱自由
2楼-- · 2019-01-03 04:15

On windows 10:

  • Search for Visual Studio on the Start window and select "Open file location":

Search for visual studio

  • Select "Troubleshoot compatibility" :

trouble shoot

  • Select "troubleshoot program":

tobleshoot

  • Raise permissions:

raise permissions

  • select "Yes, save these settings for this program"

  • Select "Close"

Once that is done, Visual studio should be running as administrator.

查看更多
放荡不羁爱自由
3楼-- · 2019-01-03 04:17

Windows 10

  1. Right click "Visual Studio" and select "Open file location Right click "Visual Studio" and select "Open file location"
  2. Right click "Visual Studio" and select "Properties" Right click "Visual Studio" and select "Properties"
  3. Click "Advanced" and check "Run as administrator" Click "Advanced" and check "Run as administrator"
查看更多
相关推荐>>
4楼-- · 2019-01-03 04:18

@Kumar

"W7 prompts everytime to run this program "devenv.exe" , anyway to get rid of that ?"

Yes. You can prevent Windows from prompting you by going to Control Panel/User Accounts/Change User Account Control settings and move the slider down.

查看更多
淡お忘
5楼-- · 2019-01-03 04:21

Right-click the icon, then click Properties. In the properties window, go to the Compatibility tab. There should be a checkbox labeled "Run this program as an administrator." Check that, then click OK. The next time you run the application from that shortcut, it will automatically run as the admin.

查看更多
▲ chillily
6楼-- · 2019-01-03 04:25

One time fix :

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\devenv.exe"="~ RUNASADMIN"
查看更多
冷血范
7楼-- · 2019-01-03 04:26

Applying this change will make it so that when you double click on a .sln file Visual Studio will not open. Also, you will not be able to drag and drop files into Visual Studio.

Follow the numbered instructions for each file in the bullited list. The paths are for a standard 64-bit install so you may have to adjust them for your system.

  • C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VSLauncher.exe
  • C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
  • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
  • C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe

    1. Right click on the file and select Properties
    2. Select the Compatibility tab
    3. Optional: Select Change settings for all users
    4. Select Run this program as an administrator
    5. Select Ok and close the dialog
查看更多
登录 后发表回答