Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run appl EXE file from a different folder
Message
From
01/02/2021 12:20:42
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01677980
Message ID:
01677983
Views:
80
Could it be that the program is running from the "program cache" rather than from disc file (as you're expecting)? That is, to say, if you execute the Appl.exe from your normal development folder, then try to execute a program (with the same name) in a different folder, the program that will be run will be from the one in the "program cache" rather than the one form the disc file. You can try using CLEAR PROGRAM before running the program to see if that's the problem you're running into. Similarly you can re-start FoxPro, then CD into the new folder and execute the program.
I've been in a habit of using one instance of FoxPro for edit/compile, and launching another for Run/Debug -- in this case if the program crashes my Edit/Compile Session is unaffected by environmental changes that might be made by the program. Similarly if there is something in the program that leaves FoxPro environment in an unstable state, I could simply close down the Run/Debug instance (if necessary forcibly through Task Manager), and my Edit/Compile session will still be running. This way of doing things (edit/compile being separate from run/debug) dates back to time back in the DOS days when I might have code that uses LOAD/CALL to run binary modules (in which case a crash could leave the PC in an unstable state -- thus forcing me to reboot. By not running the program in the same session where I was Editing/Compile meant I don't have any unsaved changes to worry about when I force a reboot).

Another thing you might have to watch for are hard-coded paths in the code. One place where this could happen that's easy to miss is if you've got a CONFIG.FP file in the project.

>Hi,
>
>My "standard" development environment is some folder d:\MyHome\ This is where if I execute the application from IDE it starts.
>
>Now I want to start the Appl.exe from a different folder (e.g. d:\Customer1). So, I copied the application file Appl.exe to this folder. Then I open VFP 9 IDE, change folder to d:\customer1 And then run command
>
>cd d:\Customer1
>do appl.exe
>
>But it still starts from the home directory (d:\MyHome).
>
>But for testing, I want the .EXE to start from the d:\customer1 folder so that I can see what the customer sees.
>
>What am I missing?
>
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform