Reputation: 6437
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?
Upvotes: 0
Views: 653
Reputation: 752
For security reasons the Win32_Process.Create method cannot be used to start an interactive process remotely.
Upvotes: 2