General information
Category:
Windows API functions
How do you execute the bat file? Do you use RUN?
By default this should stop processing until the bat has run its course.
If you use ShellExecute you can use the window handle that is passed back in the structure and check the window existence with the IsWindow api.
Alternatively, you might want to look in the downloads section for Ed Rauh's Launch App or something like this. He has already has written code to launch external utilities and has parameters to wait etc.
Mace
>Hi
>
>I am sure I have seen an answer to this problem before.
>
>I am kicking of a command window which is running a bat file, the bat file is using ISQL to run some SQL, and write the results to a file.
>
>I need the program to wait until the command window has been closed by the exit command in the bat file.
>
>Does any one know of an API , or a wrapper function to do this..
>
> I this I could get the handle of the window when I first open it, and then loop until the handle is no longer there ?
>
>Thanks for your help in advance.
>
>Regards
>
>Steven Bowskill
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only