Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Executing DOS Batchfile within Program
Message
 
À
11/04/2001 14:50:50
Saju Sukumar
Bin Hindi Informatics
Manama, Bahrain
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00494582
Message ID:
00494610
Vues:
20
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform