[英]Specify that a remote process created by wmi should interact with the desktop
I know I can create a remote process via WMI, something like: 我知道我可以通过WMI创建一个远程进程,例如:
object[] theProcessToRun = { "notepad.exe" };
var path = new ManagementPath(String.Format(@"\\{0}\root\cimv2", "win7test-hyperv"));
var scope = new ManagementScope(path);
var theClass = new ManagementClass(scope, new ManagementPath("Win32_Process"), new ObjectGetOptions());
theClass.InvokeMethod("Create", theProcessToRun);
But can I specify that should interact with the desktop (like psexec's -i)? 但我可以指定应该与桌面交互(如psexec的-i)吗? I'd also like to be able to specify what user session the UI should interact with?
我还希望能够指定UI应该与哪些用户会话进行交互?
出于安全原因, Win32_Process.Create方法不能用于远程启动交互式进程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.