首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >禁用UAC时,在Administrator下运行应用程序

禁用UAC时,在Administrator下运行应用程序
EN

Server Fault用户
提问于 2012-11-07 23:51:14
回答 1查看 2.4K关注 0票数 2

禁用UAC时,应用程序将以常规模式启动(即,它不考虑清单),也不会出现凭据窗口(用于管理员的登录/密码)。

如果禁用了(.NET)应用程序,是否有任何方法迫使运行(.NET)应用程序的Windows在管理特权下运行(就像“running”上下文菜单所做的那样)?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2012-11-08 00:01:13

  • 右键单击应用程序并转到Properties
  • 转到“兼容性”选项卡
  • 选中“以管理员身份运行此程序”复选框。

运行具有管理权限的应用程序的C# .Net代码:

代码语言:javascript
复制
ProcessStartInfo startInfo = new ProcessStartInfo(cmd); //cmd is the application you are trying to start
startInfo.Verb = "runas"; // This will set it to run as an administrator
startInfo.Arguments = args; // arguments to pass to the application that is being started
Process.Start(startInfo);

你可以在这里找到更多的信息。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/446521

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档