Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing DOS Batchfile within Program
Message
 
To
11/04/2001 14:50:50
Saju Sukumar
Bin Hindi Informatics
Manama, Bahrain
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00494582
Message ID:
00494610
Views:
22
>I need to execute a DOS batch file within my program and I did it with
>RUN /N2 "File Name.BAT", and it works perfectly alright. My problem with this one is that since I use the /N2 flag the execution continues within my application eventhough the commands in batch file still pending. I need to overcome this problem and one option which I have in front of me is let the dos window run in foreground by removing the /N2 flag. I am searching for any other options which will help me in solving this problem.

Check Ed Rauh's API_APPRUN programming from the download section. It allows for the caller to wait for the batch file to complete. Another approach would be to use the Windows Script Host, translating the batch file (if necessary) to VBScript, and calling it with the WScript.Shell object's Run method, which has an optional parameter that will cause the caller to wait until completion.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform