Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FoxPro 2.6 for Windows running a Program via a MS-DOS Batch File.

Status
Not open for further replies.

wellster34

Programmer
Sep 4, 2001
113
CA
Hi,

Is there a way to run a FoxPro 2.6 for Windows Program via a MS-DOS Batch File? [dazed]

Thanks,
Josh
 
Have your batch file call Fox using something like:

START FOXPROW MyProg.prg /WAIT

The /WAIT parameter will cause the batch file to pause as long until the Fox program finishes.

In MyProg.prg, do your processing and as the last line, have a QUIT statement.

Dave S.


 
The GOOD News is that your idea works great! Thanks. However, I now ran into another situation... I can run the batch file manually and it works okay. The situation I'm now having is that if I want to set up this Batch File to run in a Monthly Schedule. i.e. using WINAT/AT. It does execute the START command???

I believe it has something to do with the fact that FoxPro opens up another window via the START command so it gets lost or something?

Does anyone have an idea on how to get around this or am I doing something wrong?
 
I saved my programs to self executing files (exes)... they run very fast and do not require foxpro on the machine. They also can be run by any scheduler very easily since is is all self contained.

Hope this helps

clark
 
Clark (cmaciag),

How do you save them that way... Once I open my program, the only option with the program is saving it as a program. How do I create the self executing file (exe) for my program?
Josh
 
To create an .EXE, you'll need to create a project and set your program as the "main" file. Then do a Build to create the .EXE. In FPW, it's not really a "standalone" code file, as it does require that the .ESL file (the FPW runtime) to also be present. [Note: For FPW 2.6, the file is FOXW2600.ESL.]

Rick
 
I started a project and added the program to it as the main file. Now, when I go under the Build options, there were only two options available that I could use:

(1). Rebuild Project
(2). Build Application

and the (3). Build Executable is greyed out??? Do I need the Distribution Kit or something in order to create an exe or did I miss a step or perform a step incorrectly? Are there missing files?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top