Results 1 to 4 of 4

Thread: Terminating the previoue process with out its Process ID.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    136

    Terminating the previoue process with out its Process ID.

    Hello Friends,
    I am having 3 EXEs like E1,E2 and E3. First 'E1' is executed, from 'E1' i am calling 'E2' and then from 'E2' iam calling 'E3', while executing 'E3', I have to close the previous processes 'E1' & 'E2'. Please guide me the way to acieve this.

  2. #2
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Terminating the previoue process with out its Process ID.

    It seems you dont like to enumurate the whole process list and find your E1.EXE and E2.EXE and terminate.

    The other solutions would be...

    I put code on E1 execute E2 and close it self.
    i.e
    Code:
    shell "E2.exe"
    unload me
    if you need a perticuler interval after executing the E2,
    you can call a timer which unloads the form after a perticuler interval.
    Code:
    shell "E2.exe"
    timer1.enable=true
    Inside timer
    Code:
    unload me
    You can do the same thing for E2 to call E3.

    or another solution is,

    When the E1 Launced, put code to write it selfs PID to a Registry value your program uses. Same as when E2 Launches, put code to write it PID to the registry as well. so when you want to terminate the process from E3, Now you have the PID's.

    There can be more solutions...
    Last edited by Fazi; Sep 8th, 2007 at 05:03 AM.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    136

    Re: Terminating the previoue process with out its Process ID.

    Thanks for your response sir. But, actually i have to terminate the process E1 and E2 after E3 started its execution. Pls guide me in this way.

  4. #4
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Terminating the previoue process with out its Process ID.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width