Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running an external program from Visual Foxpro program
Message
De
15/06/1998 12:25:37
 
 
À
12/06/1998 16:34:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00107729
Message ID:
00108254
Vues:
36
If you are tring to run a DOS app., in Win95 or WinNT then you could use this:

DECLARE LONG ShellExecute IN "SHELL32.DLL" LONG HWND, STRING LPSZOP,;
STRING LPSZFILE, STRING LPSZPARAMS, STRING LPSZDIR, LONG NSHOWCMD
DECLARE LONG GetDesktopWindow IN "WIN32API"
*
STORE 'H:\DIRTEST.TXT' TO mFILE1
=ShellExecute(GetDesktopWindow(), "OPEN", "COMMAND.COM",;
"/C DIR C:\*.* >> C:\MDF.TXT", "C:\", 0)
=ShellExecute(GetDesktopWindow(), "OPEN", "Z:\FLAG.EXE",;
"H:\DIRTEST.TXT SRO", "H:\", 0)

The first ShellExecute runs a DOS command, the second runs the FLAG command on a Novell server to change the H:\DIRTEST.TXT file to SRO.

The Arguments are:
"OPEN" - Required
"COMMAND.COM" - File to be RUN
"/C DIR C:\*.* >> C:\MDF.TXT" - Command Arguments, NOTE: there is no space between the command.com and the Arguments
"H:\" - default directory to be run in
0 - the show command, 0 = no window, 1 = show window

give this a wearl and see if it helps
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform