开发者

Start a process as a specific user, from a WCF managed service running as LocalSystem

开发者 https://www.devze.com 2023-02-04 04:23 出处:网络
Is it possible to spawn a process on a remote serv开发者_如何学Goer, from a WCF service hosted asWindows Managed Service, when the service is running as LocalSystem?

Is it possible to spawn a process on a remote serv开发者_如何学Goer, from a WCF service hosted as Windows Managed Service, when the service is running as LocalSystem?

I need people to be able to execute things on remote servers under the context of their own accounts (basically like PSExec - which isn't an option).

I've made some half-hearted attempts to do this before, but when using process.start, cannot get the process to run as a specific user, if the Windows service hosting the WCF component is running as LocalSystem.

I know this can be acheived by other methods, but I specifically would like to know if the above is achievable - Windows service running as LocalSystem & hosting WCF service, then spawning a process as a specified user.

Thanks

Mick


You could use the Process.Start method which allows you to specify the user under which the process will run.

0

精彩评论

暂无评论...
验证码 换一张
取 消