WMI question  
Author Message
turczytj





PostPosted: .NET Framework Networking and Communication, WMI question Top

I've got an app that uses WMI to start up an application on a remote computer. It works fine except that no GUI is displayed. For example, I use the InvokeMethod on a ManagementClass object I have, passing in "notepad.exe" as a parameter. It executes fine and when I look on the other computer, the notepad process is found in Task Manager, but no notepad GUI is displayed nor can I <alt> <tab> to it.

Any ideas how I can get the GUI to display Thx in advance.

todd



.NET Development5  
 
 
ahmedilyas





PostPosted: .NET Framework Networking and Communication, WMI question Top

it may well be running under a different user account. Check the user who started the process in task manager when you invoke the command.

can you supply some code that you have used

One cheeky way would be to create a scheduled task to run the application once, one that user account...so itll automatically run that process.



 
 
turczytj





PostPosted: .NET Framework Networking and Communication, WMI question Top

I am logged in under the name that shows up in Task Manager for the started app. The code is roughly as follows:

mgmtPath = new ManagementPath("Win32_Process");

processMgmtClass = new ManagementClass(mgmtScope, mgmtPath, null);

mgmtObserver = new ManagementOperationObserver();

completionHandler = new CompletionHandler();

mgmtObserver.ObjectReady += new ObjectReadyEventHandler(completionHandler.Done);

processClass.InvokeMethod(mgmtObserver, "Create", appArguments);

The completionHandler.IsComplete returns true and the return value is "success". Just no GUI...Is there any type of parameter that indicates to show a GUI


 
 
turczytj





PostPosted: .NET Framework Networking and Communication, WMI question Top

Anybody have any ideas I'm not getting anywhere on this...