缺少“以管理员身份运行”在VS Installer的快捷方式中 [英] Missing "Run as Administrator" in VS Installer's Shortcut
问题描述
我从 Visual Studio安装程序中的应用程序 .EXE 创建了快捷方式,但是生成的快捷方式没有 以管理员身份运行
I created a shortcut from the application .EXE in Visual Studio Installer, but the resulting shortcut did not have the option of "Run as Administrator" when I right-clicked the shortcut icon.
程序文件中的应用程序 .EXE 确实允许在右键单击时使用此选项。如果我不是通过部署而是通过 .EXE (即 创建快捷方式)手动创建了快捷方式,则生成的快捷方式也具有该选项。
The application .EXE in Program Files does allow this option on right-click. If I created the shortcut manually from the .EXE (i.e. "Create Shortcut") instead of from the deployment, then the resulting shortcut also has that option.
如何在 Visual Studio Installer 中部署应用程序以包括在右侧启用了 以管理员身份运行选项的快捷方式-click?
How to a deploy an application in Visual Studio Installer to include a shortcut that has "Run as Administrator" option enabled on right-click?
推荐答案
如果您有清单,则可能需要具有管理员权限,请在清单中添加以下内容
If you have a manifest, you can require to have administrator privilege, add the following to your manifest
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
请参见 http://msdn.microsoft.com/en-us/library/bb756929.aspx
您也可以在注册表的帮助下以管理员身份运行任何文件类型,请参见 http://www.howtogeek.com/howto/windows-vista/add-run-as-administrator-to-any-file-type-in-windows-vista/
You can also run any filetype as administrator with the help of the registry, see http://www.howtogeek.com/howto/windows-vista/add-run-as-administrator-to-any-file-type-in-windows-vista/
这篇关于缺少“以管理员身份运行”在VS Installer的快捷方式中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!