Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running an external program from Visual Foxpro program
Message
From
15/06/1998 12:25:37
 
 
To
12/06/1998 16:34:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00107729
Message ID:
00108254
Views:
37
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform