Event modeling

  • Thread starter Thread starter Rasheed
  • Start date Start date
R

Rasheed

Hi All

I have two exe,
Second.exe will be execute only after first.exe executed successfully
(without exception),
So how will i do ,

I need to use some event model mechanism, to accomplish this task, I
hope,

So please help me, what function I need to use and how?
Please provide sample then it would be very help full for me.

Regards
Rasheed shaik.
 
Hi Rasheed
Could you provide any more details on your doubt.
Like:
How are you executing the executables, through code or by double
clicking them?
What kind of output are the two executable generating?

Of course you will need to know the output of the first.exe to
determine whether it has executed successfully or not.

Prateek
 
Hi wnraman,

Please find the answers for your questions
How are you executing the executables, through code or by double clicking them?
I am executing the executables using System.Diagnostics.Process.Start
(Processname, Arguments);
Actually the first.exe file will set some environment, whereas
second.exe will use that environment and produce some desired output.

If the first.exe will fail to create the environment then second.exe
should not run. If the first.exe failed then it throws the exception
why it fails. but when the first.exe failed then second.exe should not
run.


for your second question if environment set properly then it won’t
give anything, but if any problem then it simply throws the exception,
that’s it.

Please feel free to ask any sort of information.


regards,
Rasheed.
 
Hi wnraman,
Please find the answers for your questions
1) How are you executing the executables, through code or by double
clicking them?
I am executing the executables through code only and I am using to
call this function to execute the first.exe
System.Diagnostics.Process.Start (Processname, Arguments);

Actually the first.exe file will set some environment, whereas
second.exe will use that environment and produce some desired output.
If the first.exe will fail to create the environment then second.exe
should not run. If the first.exe failed then it throws the exception,
why it fails. But when the first.exe failed then second.exe should
not
run this is also I need to handle in my code so please suggest me how
to control it.

2) For your second question if environment set properly then it won’t
give anything, but if any problem then it simply throws the
exception,
that’s it.
Please feel free to ask any sort of information.

Regards,
Rasheed.
 
Back
Top