我知道我可以通过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);
但是我可以指定应该与桌面交互(比如psexec的-i)吗?我还希望能够指定UI应该与哪些用户会话进行交互?