从强制配置文件管理员应用程序 [英] Forcing an application to Admin from config file

查看:133
本文介绍了从强制配置文件管理员应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,我可以在配置文件中添加一个设置,以便该应用程序将始终启动为管理员?
非常感谢。

Is there a way I can add a setting in the configuration file so that that application will always start as admin? Thanks a lot.

推荐答案

不从配置文件,但在名为.manifest。

Not from the config file, but in the .manifest.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
            </requestedPrivileges>
        </security>
    </trustInfo>
</assembly>

http://blogs.msdn.com/b/nikhiln/archive/ 2007/04/19 /嵌入-A-清单到化妆的应用,提升功能于vista.aspx

这篇关于从强制配置文件管理员应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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