以管理员身份运行应用程序 [英] Run an application as administrator

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

问题描述

嗨大家好

i希望学习如何使用VB.Net或C#

forx以管理员身份运行我的应用程序。

解决方案

嵌入应用程序清单: MSDN [ ^ ]


1 。需要添加应用程序清单文件

2.修改应用程序清单文件:

 < ;   requestedExecutionLevel       level   =  asInvoker    uiAccess   =  false    /  >  
< requestedExecutionLevel level = requireAdministrator uiAccess = false / >
< requestedExecutionLevel level = highestAvailable uiAccess = false / >



有三个级别:默认为asInvoker;以管理员身份运行应用程序您需要将级别设置为requireAdministrator

Hi Guys
i want to learn how to Run my application as administrator using VB.Net or C#
thanx for all.

解决方案

Embed an application manifest: MSDN[^]


1. need to add an application manifest file
2. modify the application manifest file :

<requestedExecutionLevel  level="asInvoker" uiAccess="false" />
<requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel  level="highestAvailable" uiAccess="false" />


there has three level: default asInvoker;Running an application as administrator you need set the level as requireAdministrator


这篇关于以管理员身份运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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