以“以管理员身份"运行C#方法. [英] Run C# method "as administrator"
问题描述
在需要管理员执行级别的应用程序中,而其余部分则不需要. Microsoft推荐的指南表明,您应该将管理级别的方法隔离到单独的EXE中,并包括一个嵌入式清单,声明要求管理员级别.请参阅应用程序兼容性手册的用户帐户控制(UAC)部分,位于: 解决方案
It sounds like you have a method in your application that needs administrator execution level, but the rest of the application does not. The recommended guidance from Microsoft indicates that you should isolate the administration-level method into a separate EXE and include an embedded manifest declaring that administrator level is requested. See the User Account Control (UAC) section of the Application Compatibility Cookbook at: http://msdn.microsoft.com/windowsvista/letter/default.aspx?pull=/library/en-us/dnlong/html/AppComp.asp#appcomp_topic4
The following thread has an example manifest file that shows how to add in the request for administrator level:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=769187&SiteID=1
这篇关于以“以管理员身份"运行C#方法.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!