I know I can create a remote process via WMI, something like:
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)? I'd also like to be able to specify what user session the UI should interact with?
出于安全原因, Win32_Process.Create方法不能用于远程启动交互式进程。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.