在运行时在Windows中以提升模式以编程方式将正在运行的进程更改为特定用户模式 [英] programatically change a running process to specific user mode from elevated mode at runtime in windows

查看:65
本文介绍了在运行时在Windows中以提升模式以编程方式将正在运行的进程更改为特定用户模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I need to know how to change a running process which is running under administrator and to run the same process under specific user at runtime without restarting. Initially my proccess should be run under administrator user, then i need to get the user name, pwd and domain name from the user. By using those credentials I need to run the same process under that specified user without restarting the process. I had referred so many websites. And i had used the code given in below link. But, i don't get my needs.

http://code.msdn.microsoft.com/windowsdesktop/CppImpersonateUser-a0fbfd54

Help me to get the answer for this. Thanks in Advance!

推荐答案

答案是肯定的,你可以做到喜欢什么,但它既不简单也不简单,除非你已经对windows进程和WMI有详细的了解,否则它不仅仅是简单的讨论。



通常你会使用一种更正常的模拟方案,这些方案得到微软的支持,用于服务器客户端交互等。



http:// msdn .microsoft.com / zh-CN / library / windows / desktop / aa376391%28v = vs.85%29.aspx [ ^ ]



如果你试图劫持正在运行的进程的安全级别,你不知道或理解它是非常困难和明显的原因。
The answer is yes you can do it like anything but it is neither simple nor easy and unless you already have a detailed knowledge of windows processes and WMI it is beyond any simple discussion.

Usually you would use one of the more normal Impersonation schemes which are well supported by Microsoft for such things as server client interaction.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa376391%28v=vs.85%29.aspx[^]

If you are trying to hijack the security level on a running process you don't know or understand it is extremely difficult and obvious why.


这篇关于在运行时在Windows中以提升模式以编程方式将正在运行的进程更改为特定用户模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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