设置“以管理员身份运行"以编程方式标记 [英] set "run as administrator" flag programmatically

查看:30
本文介绍了设置“以管理员身份运行"以编程方式标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过编程方式在 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.

推荐答案

上游构建过程应该使用 require 管理员属性来显示您的 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆