默认情况下,如何以管理员身份运行Visual Studio?

本文翻译自:How do I run Visual Studio as an administrator by default?

I recently discovered that even while logged into my personal laptop as an administrator, Visual Studio does not run in administrator mode and you need to explicitly use Run As Administrator . 我最近发现,即使以管理员身份登录我的个人笔记本电脑,Visual Studio也不会以管理员模式运行,您需要明确使用以管理员身份运行”

Is there a way to make it run as an administrator by default, other than creating a shortcut, etc.? 除了创建快捷方式等之外,有没有办法让它作为管理员默认运行?


#1楼

参考:https://stackoom.com/question/eVf7/默认情况下-如何以管理员身份运行Visual-Studio


#2楼

Applying this change will make it so that when you double click on a .sln file Visual Studio will not open. 应用此更改将使您在双击.sln文件时无法打开Visual Studio。 Also, you will not be able to drag and drop files into Visual Studio. 此外,您将无法将文件拖放到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. 这些路径用于标准的64位安装,因此您可能需要为系统调整它们。

  • 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 右键单击该文件,然后选择“ Properties
    2. Select the Compatibility tab 选择Compatibility选项卡
    3. Optional: Select Change settings for all users 可选:选择Change settings for all users
    4. Select Run this program as an administrator 选择Run this program as an administrator
    5. Select Ok and close the dialog 选择确定并关闭对话框

#3楼

@Kumar @Kumar

"W7 prompts everytime to run this program "devenv.exe" , anyway to get rid of that ?" “W7每次都提示运行这个程序”devenv.exe“,无论如何要摆脱它?”

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. 您可以通过转到“控制面板/用户帐户”/“更改用户帐户控制”设置并向下移动滑块来阻止Windows提示您。


#4楼

右键单击图标 - >属性 - >高级 - >检查复选框以管理员身份运行,每次在管理模式下打开(Win​​dows 8相同)


#5楼

windows 8 窗户8

there is no advanced tab anymore. 没有高级标签了。 So, to do it automatically, you need to follow the next steps : 因此,要自动执行此操作,您需要执行以下步骤:

-right click on the shortcut - 右键单击​​快捷方式
-click on properties - 点击属性
-under the "Shortcut" tab, click on "Open File Location" - 在“快捷方式”标签下,点击“打开文件位置”
-then, right click on devenv.exe 然后,右键单击devenv.exe
-Troubleshoot compatibility -解决兼容性
-Troubleshoot program - 攻击程序
-Check "The program requires additional permissions" - 检查“该程序需要额外的权限”
-Then next, next next,... - 接下来,接下来,......


#6楼

For Windows 8 对于Windows 8

  1. right click on the shortcut 右键单击快捷方式
  2. click on properties 点击属性
  3. click on the "Shortcut" tab 单击“快捷方式”选项卡
  4. click on Advanced 单击“高级”

You will find Run As administrator (Checkbox) 你会发现运行方式管理员(复选框)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章