开发者

Become "the real administrator"(Windows) and perform real admin tasks in .NET C#?

In Windows just because your account is in the Administrators group doesn't mean it is privileged 开发者_开发技巧enough to be able to delete some system files. Is there a way to perform actions with this 'supreme' admin power in C# without having to login to Administrator account(Only using an account in the Administrators group).

EDIT

In my case it is a personal application (I'm sorry I didn't specify this) and I trust myself to not delete any system files or give any rogue virus access to this privilege. I am using a domain account on a personal computer and while I have got Administrator on my personal computer I don't want to keep switching between users. What I want is a simple way of running my program as the highest possible privileged user. Is there no way whatsoever unless logged in as a full Administrator?


Question Answered thanks. I have been informed that there is no possible way of launching an application with FULL administrator rights as you can in Linux with the sudo command. Adding a UAC manifest was helpful though as it specified how to implement rights into my app(http://msdn.microsoft.com/en-us/library/bb756929.aspx).

//closed

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜