设置"以管理员身份运行"标志编程 [英] set "run as administrator" flag programmatically
问题描述
是否有可能以编程方式设置以管理员身份运行标志的exe文件或快捷方式文件?
Is it possible to programmatically set the "Run As Administrator" flag on exe file or shortcut file?
是否Installshield的支持此功能,如果我会做它作为安装过程的一部分?
Does Installshield support this functionality if i'll do it as part of the installation process?
我试图找到相关的命令行/ API / InstallShield进行此命令。
I'm trying to find the relevant command line / API / installshield command for this.
推荐答案
上游的构建过程中,应体现你的EXE与需要管理员属性。这不会有什么使用InstallShield或快捷方式。做得正确,当用户单击快捷方式时,Windows会看到清单和UAC会提示提升。
The upstream build process should be manifesting your EXE with the require administrator attribute. This doesn't have anything to do with InstallShield or the shortcut. Done correctly when the user clicks the shortcut, Windows will see the manifest and UAC will prompt for elevation.
这篇关于设置"以管理员身份运行"标志编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!