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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS FoxPro for Windows 2.5a - creates bad EXE's 1

Status
Not open for further replies.

millsrs

Programmer
Feb 16, 2009
21
US
Hi!
I'm using MS FoxPro for Windows 2.5a which was an upgrade from FoxPro for DOS 2.0. On November 18, 2014 we got the Distribution Kit for it. However, when I try to create an executable from my project created after the Kit was installed, it just starts up and closes never running the program that was set as 'Main'. What have I forgotten to do? From the research I've done I think I'm on the right track but the EXE just won't run the 'main' program. Help, Please!

Thanks,
MillsRS
 
I suppose the DK could be "bad", but from what I remember you just wouldn't get an exe.

Do you by chance have a config.fpw in that folder? If so, look for COMMAND= and ASSIST= entries. Those might subvert the normal thing-o.
 
Hopefully you don't have SCREEN=OFF and only start in screen forms.

You could also put some MESSAGEBOX() calls into your main.prg to see a) if it's started and b) how far you come.
One thing, I came across some years ago is, that VFP normally VFP will show a build error, if it can't create a new EXE or APP file while building, but sometimes not, or it's only written to the build .err file and not notices. You build and simply don't get a new APP or EXE. Make sure the EXE is not listed in processes in the task manager.

Bye, Olaf.
 
Hello Dan and Olaf!
Thank you both for your latest suggestions.

Dan, my DK does create an EXE but never opens my 'main' top-level program. The associated Config.fpw is in the FoxPro for Windows folder and any 'Command' lines have been remarked out.

Olaf, I have used old-style WAIT WINDOWS to help display execution progress. That's how I learned the top-level program isn't even started. However, I will check for error logs even though I'm using FoxPro for Windows 2.5b (I thought it was 'a' until I double-checked). Since APP and EXE's are both really created, it's made things tough. I will also check the Task Manager per your suggestion.

Again, thanks to you both for your help! It's been SO helpful!
 
Question for you: how do you identify your main program in a project?

(This is a serious question and not a flinging of pasta against the wall to see if it's done.)
 
Hi Dan, I took your question in the spirit intended because I feel its on track. In the project I selected the 'top-level' program and then, from the PROJECT menu, selected the 'Set Main' option. A black dot appeared in the project window next to the correct program's name. Is there more I need to do before trying to build an EXE? Again, I really do appreciate your help!
 
That's all it should take.

You're launching these executables (or trying to) from Windows Explorer, right?

Earlier you (or someone) mentioned having both .APP and .EXE files. Shouldn't happen. IIRC, an app is generated as part of building an EXE but the APP gets deleted after the EXE is created. You might try deleting both before you tray a compile/run.

 
Dan,
Yes, I'm launching the EXE from within Windows Explorer (so far). To be honest, I've never checked to see if the .APP is around, because I place the EXE in the directory where the data tables are which is different than the FoxPro for Windows directory.

After all this we've chosen to consider our copy of the Distribution Kit to be the problem. We've found a worthwhile commercially available copy of the Kit online. But for $99 for diskettes we've finally convinced out boss to try using the copy of Visual FoxPro 5.0 Professional we have in stock. It just needs to be installed. We'll be doing so after the holiday weekend.

I hope you have a great holiday weekend. Your continued help is greatly appreciated.

Regards,
 
Dan, I mentioned APP files. Doesn't matter much.

>I place the EXE in the directory where the data tables are which is different than the FoxPro for Windows directory
OK, that doesn't explicitly states, but suggests you compile in the Foxpro home dir? Where do you have your source code project? Inside the foxpro home folder?

Your new EXE then most probably isn't created in the home folder, what you copy from there to your data folder is newer renewed, the home folder is readonly and the new EXE is created in a virtualstore directory, which is used to redirect writes into write protected system folders to a writable per user directory. This is a measure of security since Vista and is called file virtualisation. Check that out: Open windows explorer and literally copy this to the top location bar:

%USERPROFILE%\AppData\Local\VirtualStore

See whether there is a program files, where you find your VFP home folder and inside that your source code and EXE. Only there you find your new EXE.

You should put foxpro projects into HOME(8) - I don't know if VFP 2.5 knows this 8th folder, if ? HOME(8) doesn't show you anythingt it would be %USERPROFILE%\Documents\Visual Foxpro Projects

Or any folder anywhere, eg on Drive D:\ E:\ whatever, outside of windows system folders. You also don't put office documents into C:\Program Files, do you? System folders are for the system, %PROGRAMFILES% is for installed products. Documents including source code goes anywhere else, you decide whether you want them in your user profile documents, where they bloat your server stored user profile or separate.

Bye, Olaf.
 
Another thing, even if you have your new EXE and copy it into the data tables directory, and that is inside a system folder, your copy will not end up there but in the virtual store. The virtual store is like a shadow copy of some folders, it only contains everything not copied to the original folders by installers or other software having the elevation to really write there. And that is even true, if you work with an administrative account, even the Administrator account is not elevated, it's only easier to elevate and some operations you do automatically ask for confirmation, which really asks for temporary elevation.

Bye, Olaf.
 
I place the EXE in the directory where the data tables are which is different than the FoxPro for Windows directory.

You're inserting variables that change the equation when we're still trying to get a simple one-line EXE to work. We don't know if it doesn't work because you're missing a runtime file from the final location or there's something wrong with your installation.

PLEASE CREATE THE SIMPLEST POSSIBLE EXE (One line of code: WAIT WINDOW) in the FPW directory, compile it there, and run it there. What happens?

THAT is the test I've been assuming you're doing.
 
Olaf,

Thanks for the advice. I will check it out on Monday.

Dan,

I will do your 1-line EXE suggestion and let you know the results sometime on Monday, 12/1/14.
 
Olaf,
I tried looking into your advice but had no luck primarily because the whole scenario is 'over my head'. But I DO appreciate your time and ideas. Thank you!

Dan,
Good News! I created your 1-line project in the FPW folder and the EXE ran PROPERLY! My next step was to retry my project. It ran perfectly! Although I have no technical reason for the success, it's like the 1-liner fixed the problem. I've been able to successfully get the desired EXE to work on the development PC and in its proposed production location on our server. Thanks for hanging in there with me! I just wanted to let you know the problem is solved and to say 'Thanks'!
 
Yay!

As anyone who's seen one of my conference or user group sessions knows, I'm always ready to deliver a "one liner". [glasses]
 
Dan,

LOL!!!!!!!!!!!!!!!!!!! Once again, thanks for hanging in there with me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top