如何创建vs解决方案的桌面快捷方式以在Windows 10中以管理员身份运行? [英] How do i create a desktop shortcut to a vs solution to run as administrator in windows 10?
问题描述
偶尔,我发现在Visual Studio 2015中工作时遇到问题,可以通过以管理员身份运行来修复。
在我的桌面(Windows 10 Pro)上,我创建了Visual Studio的快捷方式,并勾选了属性|高级|以管理员身份运行,工作正常。
我刚刚为项目的 *。sln 文件创建了一个快捷方式我目前正在努力。这在Visual Studio中打开解决方案没有问题,但是我无法勾选与上面相同的选项以使其以管理员身份运行。选项只是灰色的吗?
有谁知道为什么会这样,如果我可以改变这个?
亲切的祝福~Patrick
我的尝试:
尝试查找快捷方式的安全属性。我有完全权限。
Hi,
Occasionally, I find I encounter issues when working in Visual Studio 2015 that are fixed by running it as an Administrator.
On my Desktop (Windows 10 Pro), I have created a shortcut to Visual Studio, and I have ticked Properties | Advanced | Run As Administrator, which works fine.
I have just created a shortcut to the *.sln file for a project I am currently working on. This opens the solution in Visual Studio no problem, but I am unable to tick the same option as above to get it to run as Administrator. The option is simply greyed-out?
Does anyone know why this may be and if I can change this?
Kind wishes ~ Patrick
What I have tried:
Tried looking in the Security properties for the shortcut. I have full privileges.
推荐答案
您只能将可执行文件设置为以管理员身份运行,因此您需要创建一个新的快捷方式,并将其指向EXE文件。将解决方案的路径添加为teh exe的参数,并将start in文件夹设置为解决方案文件夹。
然后,您可以将高级选项设置为以管理员身份运行。
所以对我来说:
目标:
C:\Program Files(x86)\ Microsoft Visual Studio 12.0 \ Common7 \\ \ n \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ bD:\Documents\AA备份\我的项目\SMApplications
You can only set executables as "run as Admin", so you need to create a new shortcut, and point it at the EXE file. Add the path to the solution as a parameter to teh exe, and set the "start in" folder to the solution folder.
Then you can set the "Advanced" option to "run as Admin".
So for me:
Target:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" "D:\Documents\AA Backed Up\My Projects\SMApplications\SMApplications.sln"
Start in:
"D:\Documents\AA Backed Up\My Projects\SMApplications"
这篇关于如何创建vs解决方案的桌面快捷方式以在Windows 10中以管理员身份运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!