Windows 7上的UAC提示/提升的权限? [英] UAC prompt/elevated permissions on Windows 7?

查看:102
本文介绍了Windows 7上的UAC提示/提升的权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,目前我正在为"netsh"网络做某种前端控制台命令.我的想法是制作一个程序,用于存储IP/netmask/网关配置文件,并允许用户在它们之间进行切换,以便他们可以轻松地重新配置其无线适配器.

执行netsh时出现问题.我使用System.Diagnostics.Process.Start进行此操作,并且如果我禁用了UAC,它也可以正常工作.否则,netsh表示它需要提升的管理员权限才能更改适配器的属性.

有什么方法可以强制执行UAC提示,以便用户可以将特权授予netsh进程?或者,如果我以管理员身份运行前端,则将权限传递给netsh ...

感谢您的帮助!

PS:我不好,我忘了告诉我正在使用C#和.NET 3.5.

Hello, currently I'm doing some sort of front-end for the "netsh" console command. My idea is to make a program that stores IP/netmask/gateway profiles and lets the user switch between them so they can reconfigure their wireless adapter easily.

The problem comes when I execute netsh. I do it with System.Diagnostics.Process.Start, and if I have UAC disabled it works flawlessly. Otherwise, netsh says that it needs elevated administrator privileges to change the adapter's properties.

Is there any way to force an UAC prompt so the user can give the privileges to the netsh process? Or if I run the front-end as administrator, pass the rights down to netsh...

Thanks for the help!

PS: My bad, I forgot to tell that I'm using C# and .NET 3.5.

推荐答案

D'oh ...在较旧的帖子中刚刚找到它...

http://social.msdn.microsoft.com/Forums/zh-CN/windowssecurity/thread/dd400cb9-d5fc-41b2-ad9d-6b91ce88c766

在下一个发布之前,我会搜索得更好时间!
D'oh... just found it, in an older post...

http://social.msdn.microsoft.com/Forums/en-US/windowssecurity/thread/dd400cb9-d5fc-41b2-ad9d-6b91ce88c766

I'll search better before posting next time!


这篇关于Windows 7上的UAC提示/提升的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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