在非管理员右C#运行过程 [英] c# run process on non-admin right
本文介绍了在非管理员右C#运行过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始在管理员权限的过程:
I started a process on admin rights:
psi.Verb = "runas";
process.StartInfo = psi;
process.Start();
但是,现在这个过程已经启动另一个应用程序,但在非管理员权限。
应用工作在非管理员权限。
我怎样才能做到这一点?
But now this process have to start another application but on non admin rights. Application works on non-admin rights. How I can do this?
感谢
推荐答案
您需要使用 http://pinvoke.net/default.aspx/advapi32/CreateProcessAsUser。 HTML
尝试使用 WindowsIdentity.GetCurrent()。令牌
获得令牌创建与过程。
Try to use WindowsIdentity.GetCurrent().Token
to get the token to create the process with.
这篇关于在非管理员右C#运行过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文