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. Process firing event too quickly

Process firing event too quickly

Scheduled Pinned Locked Moved C#
csharphelpquestionlearning
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.
  • T Offline
    T Offline
    Talal Sultan
    wrote on last edited by
    #1

    Hi people, I am running a DOS batch file (.bat) from inside a C# code. I am using the Process class to do that. The problem I have is weird, it seems that on the dev machine, the process is firing the event too quickly (i.e. it is not even executing) and since the call is supposed to create a file on disk, the file of course is not found. On the other hand, on a normal (client) machine, it seems to work, but i'm not sure that it works all the time. Could anyone give me some solution to this weird problem? Thanks, Talal

    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook

    G 1 Reply Last reply
    0
    • T Talal Sultan

      Hi people, I am running a DOS batch file (.bat) from inside a C# code. I am using the Process class to do that. The problem I have is weird, it seems that on the dev machine, the process is firing the event too quickly (i.e. it is not even executing) and since the call is supposed to create a file on disk, the file of course is not found. On the other hand, on a normal (client) machine, it seems to work, but i'm not sure that it works all the time. Could anyone give me some solution to this weird problem? Thanks, Talal

      "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Are you calling the process synchronously or asynchronously? An asynchronous call returns immediately without waiting for the process to finish executing.

      --- Year happy = new Year(2007);

      T 1 Reply Last reply
      0
      • G Guffa

        Are you calling the process synchronously or asynchronously? An asynchronous call returns immediately without waiting for the process to finish executing.

        --- Year happy = new Year(2007);

        T Offline
        T Offline
        Talal Sultan
        wrote on last edited by
        #3

        hi, thanks for the quick reply. well as a matter of fact, I'm calling it asynchronously, I am using the event p.Exited += new EventHandler(Ended) to perform some processing once the command line process has terminated. Thanks, Talal

        "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook

        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