Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wait for cmd window to finish
Message
From
10/07/2002 03:37:28
 
 
To
10/07/2002 03:22:10
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00676931
Message ID:
00676934
Views:
23
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
Map
View

Click here to load this message in the networking platform