Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can FoxDos 2.6 set DOS ErrorLevel?
Message
 
À
15/06/1998 10:31:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00108223
Message ID:
00108230
Vues:
47
If you are looking for simple results, you may want to set a DOS variable in your autoexec.bat file, then, instead of calling the DOS program directly, you can call it via a .bat file and set the DOS variable = DOS error level. Then back in FoxPro, you can use GETENV() function. I'm not positive, but I believe Foxpro DOS does have this function.

Ex: In autoexec.bat, just to establish DOS variable
(if not created at AUTOEXEC, or anytime before the Foxpro session starts,
it won't see the variable created through the RUN command)
DOS2FoxError = 0

Ex: Batch file to call DOS program and store error

DOS2FoxError = ErrorLevel

Then in Foxpro,
lnDOSError = GetEnv( "DOS2FoxError" )
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform