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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Starting AND Monitoring status of a Process on a Remote workstation

Starting AND Monitoring status of a Process on a Remote workstation

Scheduled Pinned Locked Moved C#
sysadmin
3 Posts 3 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.
  • D Offline
    D Offline
    diePopster
    wrote on last edited by
    #1

    Hi there, I want to start a process on a remote machine and as soon as the process is complete i want to start a local process. Keep in mind that: - I only have the UNC of the remote pc - The process that must be run is stored on the remote pc and must be run on that pc. - I do not want to map network drives (although it's highly unlikely that i should) This is how I would do it if the first process was run on my local machine.

    myProcess.Start();
    myProcess.WaitForExit()
    //next process

    Thank you,

    L D 2 Replies Last reply
    0
    • D diePopster

      Hi there, I want to start a process on a remote machine and as soon as the process is complete i want to start a local process. Keep in mind that: - I only have the UNC of the remote pc - The process that must be run is stored on the remote pc and must be run on that pc. - I do not want to map network drives (although it's highly unlikely that i should) This is how I would do it if the first process was run on my local machine.

      myProcess.Start();
      myProcess.WaitForExit()
      //next process

      Thank you,

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      diePopster wrote:

      I want to start a process on a remote machine ...

      You are going to need some communications vehicle between the two systems so the initiator sends a message to the remote telling it to start the process, and when it terminates to return a completion message. You could do this with sockets, or maybe WCF, although sockets may be easier to learn. Take a look at some of the links here[^] for more information, or search Google for 'WCF' if you decide on that route.

      1 Reply Last reply
      0
      • D diePopster

        Hi there, I want to start a process on a remote machine and as soon as the process is complete i want to start a local process. Keep in mind that: - I only have the UNC of the remote pc - The process that must be run is stored on the remote pc and must be run on that pc. - I do not want to map network drives (although it's highly unlikely that i should) This is how I would do it if the first process was run on my local machine.

        myProcess.Start();
        myProcess.WaitForExit()
        //next process

        Thank you,

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        I believe you can do this using WMI. Read this[^] article or this[^] post. Hope it helps.

        It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD

        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