WMI remote call
-
Hi, I am using WMI to make a call to an executeable on a remote server. I have this defined in the managementpath, \\\\\\root\\cimv2:Win32_Process My actual exe is located on the D drive of the same machine. Is it required that this exe also be located on the C drive of the remote server???? Also, in the ManagementBaseObject class, method the InvokeMethod as a returnValue parameter. What are all the possible values for this parameter? What value is returned if successful versus failed? Thanks so much!!
-
Hi, I am using WMI to make a call to an executeable on a remote server. I have this defined in the managementpath, \\\\\\root\\cimv2:Win32_Process My actual exe is located on the D drive of the same machine. Is it required that this exe also be located on the C drive of the remote server???? Also, in the ManagementBaseObject class, method the InvokeMethod as a returnValue parameter. What are all the possible values for this parameter? What value is returned if successful versus failed? Thanks so much!!
Try reading the documentation on the Win32_Process class, Create method.Create method[^] for the return values. If you're trying to run a process remotely that puts up a user interface, like Notepad for example, for the logged in user to see, you can't. It's a HUGE security risk, so WMI won't let you do it. You CAN however run an executable that does NOT show any user interface, like a Console application. You can launch the .EXE with the file being on your machine but ONLY if the .EXE file resides in a network share ono your machine. If you don't understand Windows Networking, just copy the .EXE file to the target machine and launch it from there. It's much simpler to do.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Try reading the documentation on the Win32_Process class, Create method.Create method[^] for the return values. If you're trying to run a process remotely that puts up a user interface, like Notepad for example, for the logged in user to see, you can't. It's a HUGE security risk, so WMI won't let you do it. You CAN however run an executable that does NOT show any user interface, like a Console application. You can launch the .EXE with the file being on your machine but ONLY if the .EXE file resides in a network share ono your machine. If you don't understand Windows Networking, just copy the .EXE file to the target machine and launch it from there. It's much simpler to do.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak