C#,如何为已经运行的进程授予系统权限? [英] C#, How to give system permission to a process which is already running?
本文介绍了C#,如何为已经运行的进程授予系统权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要为当前进程授予系统权限,而无需重新启动它。我怎么能这样做?
解决方案
我开始在评论中回答你的一个问题。此外,请参阅此CodeProject文章:
使用C#获得高级权限 [ ^ ]。
另见本书: https://books.google.com/books?id=tueCPQ3X3y4C&pg=PA143&lpg=PA143&dq=get+permission+information+of+current+process+%28C%23+OR+.NET%29&source = BL&安培; OTS = bcyNnZnOQV&安培; SIG = cJkbFEXTfNtgqP3Nq6FUq gUVD4I&安培; HL = EN&安培; SA = X&安培; VED = 0CEkQ6AEwBmoVChMIsZaR-9eLyQIVTKMeCh0bxgqi#V = onepage&安培; Q =获取%20permission%20information%20of%20current%20process%20%28℃%23%20OR%20.NET%29&安培; F = false [ ^ ]。
最后,这个库: https://processprivileges.codeplex.com [ ^ ]。
-SA
I need to give system permission to current process without restarting it. How can I do this?
解决方案
I started to answer one of your questions in comments. Also, please see this CodeProject article:
Getting Elevated Privileges on Demand using C#[^].
See also this book: https://books.google.com/books?id=tueCPQ3X3y4C&pg=PA143&lpg=PA143&dq=get+permission+information+of+current+process+%28C%23+OR+.NET%29&source=bl&ots=bcyNnZnOQV&sig=cJkbFEXTfNtgqP3Nq6FUqgUVD4I&hl=en&sa=X&ved=0CEkQ6AEwBmoVChMIsZaR-9eLyQIVTKMeCh0bxgqi#v=onepage&q=get%20permission%20information%20of%20current%20process%20%28C%23%20OR%20.NET%29&f=false[^].
And, finally, this library: https://processprivileges.codeplex.com[^].
—SA
这篇关于C#,如何为已经运行的进程授予系统权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文