Subject Re: Problem with Project .EXE file
From Andy Taylor <andy.taylor.1959@outlook.com>
Date Sat, 20 Jun 2020 17:03:31 -0400
Newsgroups dbase.getting-started

Ketan,

Please remember what I said in the "Wait Window Nowait" thread that the command window is not present in a generated exe file.

In the dBASE IDE it is the presence of an open command window that enables all the normal dBASE commands that you use in abc.prg
to work in the way that you expect.  An exe program does not have that capacity.  The command window officially exists as a mere courtesy to the developer.
It is no longer intended as a user interaction tool (and ever since dBASE IV they have tried to wean developers off it) :-)

To check what I am saying please go back to the dBASE IDE, close the command window and run the program by double-clicking on abc.prg in the navigator.
The results will be exactly what you see when you run the exe.
As Mervyn suggests, you can also insert msgbox() commands in your abc.prg file to follow your programs progress... e.g. msgbox("You got here #1"), etc.

If you want to create an exe that interacts with the user (as if you have the command window open) then you must provide yourself the windows based input/output
stuff that the presence of the command window enables MS Windows to hook onto for the interaction.  Now, it is actually easy to do this via a dummy control form
much like the popup form that I used in Progress.prg, but without seeing your abc.prg I cannot say what commands work with no issues in an exe and which will fail
and therefore need the help of a dummy command window....
I don't have a template for a dummy command window readily available so would have to knock one up (although I could grab the basics from a migration project I am
involved in but I want to know first if that is your problem or not).

Andy

> Thanks for all the ideas for the earlier Wait Window Nowait post.
>
> This is a query about the .EXE file created by "building" a project file.
> The project is based on just a single xbase program but additional
> items are as follows (with options specified while building)
>
> 1) abc.prg - specified as main program
> 2) lib.prg - library, to be included in executable
>
> Three tables
> 3) xinput/xlookup/xoutput.dbf - all local dbase tables
> these are not included in the project file but they are located in a
> specific directory which is hard coded in abc.prg
> (not the best approach but the program is just
> a small utility which will reside on 3/4 computers).
>
> 4) plusr_en.dll - not embedded in .exe file but copied
> to the same directory where abc.exe is located
>
> (when this was embedded, got a message saying the
> "dll could not be found" hence switched to this option)
>
> other options
> 5) No UAC
> 6) Standard INI file
> 7) BDE off (tried setting this on with no difference in result)
> 8) All other options as default.
>
> the project compiles with no errors, abc.exe gets built.
> the first step of the program asks the user to select a
> directory with getdirectory(), the .exe file runs upto
> and including this part and then just nothing.
>
> However, the program runs with no problem as a
> .prg file within dbase (at the command window  with "do abc")
>
> Any ideas/suggestions on why this is happening?
> am using dbase 11.
>
> Ketan
>