如何在会话1中以用户身份从Windows服务运行线程。 [英] How to run thread from a windows service as a user in session 1.

查看:77
本文介绍了如何在会话1中以用户身份从Windows服务运行线程。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows服务在会话0中运行,我有一个代码,我需要在会话1中作为用户运行

来自Windows服务。请随时指导,因为我是新手。

Windows services run in session 0, i have a code that i need to run as a user in session 1
from the windows services. Please feel free to guide as i am new on this.

推荐答案

再次分析要求。你真的需要从用户会话中运行服务的代码吗?肯定不是。

您需要一个在用户上下文中运行的应用程序,该应用程序通过例如服务与服务进行通信。 .Net Remoting(旧)或WCF,......
Analyse the requirements again. Do you really need to run "code" of the service from a user session? Surely not.
You need an application running in the context of the user which communicates with the service by e.g. .Net Remoting (old) or WCF, ...


你做不到。它被认为是一种安全风险,微软已采取措施阻止你做你想做的事。
You can''t do that. It''s considered a security risk and Microsoft has taken steps to prevent you from doing what you want to do.


1)Goooooooggggggggllllleeeeeee !!!!!!

2)看看这里:颠覆32位和64位架构中的Vista UAC [ ^ ]

3)如果你不想打扰自己,你甚至可以用适当的参数调用psexec windows api
1) Goooooooggggggggllllleeeeeee!!!!!!
2) Have a look here: Subverting Vista UAC in Both 32 and 64 bit Architectures[^]
3) you can even call psexec with proper parameters if you don''t want to bother yourself with the windows api


这篇关于如何在会话1中以用户身份从Windows服务运行线程。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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