Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. WMI remote call

WMI remote call

Scheduled Pinned Locked Moved C#
sysadminquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vanikanc
    wrote on last edited by
    #1

    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!!

    D 1 Reply Last reply
    0
    • V vanikanc

      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!!

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      V 1 Reply Last reply
      0
      • D 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

        V Offline
        V Offline
        vanikanc
        wrote on last edited by
        #3

        Awesome!! thanks, that is what I was looking for, in terms of what is returned in the returnValue parameter. It is a console based application, which does NOT put up a user interface. This works well!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups