Question

Compiling Foxpro .exe to open from anywhere

Asked by: dance1bb

I know how to compile a foxpro program to a .exe that runs fine from my computer that I created it on. I cannot however get it to open from any other computer, I get 'Cannot locate the microsoft visual foxpro library' when trying to open the .exe from another computer. I was told I would have to create a .dll to get the .exe to work dynamically from any other computer. My question would be:

1) Is there something I am missing when I compile this program that I need in order to get it to open? Any help if very much appreciated

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-10-27 at 12:29:21ID21610675
Tags

foxpro

,

exe

,

compile

Topic

FoxPro Database

Participating Experts
4
Points
125
Comments
13

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Visual Foxpro Overhead
    Hi, If I have a Visual Foxpro application running and this application calls another three more separate VFP applications (.exe), does the three programs incur the same overhead as the first or they will share the currently running DLLs, etc. to speed up the loading ? Pleas...
  2. Foxpro Decompiler
    i need a foxpro decompiler(for .app files) i need a full and free version plz help me out Deadly waiting......
  3. Foxpro with VB
    This group spent money on a VB-SQL program that was never used. It was intended to replace the old Dos Clipper program that is still in use. Now we found that converting to Visual Foxpro data and Code is much easier and more error free than going to SQL Server. This is ba...
  4. Advantanges & Disadvantages in Foxpro
    1. I would like to know the advantanges and disadvanteges in Visual foxpro compare to other DBMS
  5. C++ DLL in FoxPro
    I need to be able to write a DLL file in Borland C++ Builder that can be used from a Visual FoxPro program. Are there any special things that need to be done in order to allow my C++ functions to be called from FoxPro? Also, how can strings be passed to the functions? Do I...
  6. Build EXE in Visual Foxpro 6.0 II
    I have build the EXE from FoxPro DOS PRG but how do I add all the DBF files to work with it. When I click on Database > add it allows you to load DBC and all files but when I load a DBF it says DBF is not valid. How do I convert all Foxpro 2.6 DBFs to run with Visual Foxp...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: CarlWarnerPosted on 2005-10-27 at 13:24:10ID: 15174481

Your compiled .exe is not a standalone .exe.  On your development PC, you have everything you need to run it however.  But, on other PCs, they don't have anything.  That means they need the runtime library files to make it all run and you must supply those files to them.  Generally, developers make a distribution setup that includes everything.  But a few others take a few files, hold their breaths, say a prayer, and hope they get those files manually setup on each user PC where they run properly.  But, it can be done.  I've done it recently on a Win98 PC where I put VFP9 runtime library files on it and it worked.

You never mention what version of the Fox you're using.

 

by: CarlWarnerPosted on 2005-10-27 at 13:28:16ID: 15174516

In case you're wisely using the latest version of Visual FoxPro, VFP9, here's the skinny on the required files:

VFP 9 Runtime Files
http://fox.wikis.com/wc.dll?Wiki~VFP9RuntimeFiles

Here's the articles on what should be done to automate the process using the free InstallShield LE that shiops with VFP7 through VFP9 on the VFP CD:

Walkthrough: Creating a Visual FoxPro Application Setup Program Using InstallShield Express
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxgen7/html/vfpdeploy.asp

'Where is the Setup Wizard?' and Other Annoying InstallShield Questions
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxtk02/html/ft02a1.asp

 

by: CaptainCyrilPosted on 2005-10-27 at 14:23:32ID: 15174930

Usually you copy vfpx*.* (where x is the version number) from development \windows\system32 to the other computer.

It worked for me on all versions up to 6. I could not get 7 and 8 running. I did not try with 9.

But I suggest creating a setup.

 

by: mikegagnonPosted on 2005-10-28 at 06:04:54ID: 15178476


To add to Carl's comment and disagree with CaptainCyril, please note that the second column ( in the Wiki site) of the list of DLL clearly indicates that certain DLL shouldn't be just copied, but rather should be registered. And maybe one day in a multi-user environment you might question certain behavior of your application that is unexplained (like slow loading) where a simple registration of the DLLs might just prevent that from happening.

 

by: dance1bbPosted on 2005-10-28 at 06:10:28ID: 15178518

I am using version 9, sorry for not mentioning. I have tried adding all my files from the directory I have the foxpro program installed in but it still gives me the same error after going through the installation. Carl, I am not sure what you mean by the 'required files'. The VFP 9 runtime files, where do I get those from? I do not have the msvcr71.dll file in a visual foxpro folder. As far as installshield, do I just dump the folder that contains my VFP program files into it?

 

by: dance1bbPosted on 2005-10-28 at 07:27:11ID: 15179208

I have been trying adding my .exe to installshield with no luck, still getting the error. In installshield is there a certain place I need to add the .exe and the .dll's? Do I even need to include the .dbf files and others that are included in the project? If anyone can tell me what files I need to include in the installshield to get this to run I would greatly appreciate it.

 

by: CarlWarnerPosted on 2005-10-28 at 10:46:08ID: 15181142

I am not yet an InstallShield expert and I think there is so much capability in InstallShield to do all sorts of things that it is unnecessarily difficult for setting up a simple app.  And the two references I posted are so lengthy, that I'm sure most of us don't even need all of the "guidance" they have written.  Maybe someday I'll write something at http://www.vfug.org/ for their free newsletter when I figure out a simple explanation that others can add on to with their more complicated requirements.

When in InstallShield and you select the VFP9 RunTime merge module, it should automatically select the dependencies, of which msvcr71.dll is one.  If you look up the list after you select the VFP9RunTime.msm merge module file, you should see two other files also checked automatically, again because they are dependencies that InstallShield is smart enough to pick up on.  [Not to confuse you, but I actually am using a slightly different version of InstallShield here and it is more than the version that ships with VFP9.  So, I may be getting stumped by even more features than you have.  I'm still fighting this version. <s>]

The .dlls should be in the Merge Modules automatically.  At one point, of course, you'll make a reference to you application executable which will use al of those dlls.  As far as including data files, you wouldn't want to install the same old data files onto a location each time your users install that program, would you?  The install program would then be setup to overwrite the newer data files when a new user gets installed, unless you are really good at InstallShield exceptions where you have figured out a way to make those filesc copy one time only where InstallShield figures out that the files already exist and it shouldn't copy them again.  I don't know how to do that yet and won't get at this point.  I would just copy the files with a batch file one time only.

 

by: CaptainCyrilPosted on 2005-10-28 at 14:09:06ID: 15182731

The way I register my dlls if I copy them is:

regsvr32 dllname.dll

 

by: CarlWarnerPosted on 2005-10-28 at 14:22:28ID: 15182788

One of the problems in registering DLLs for all of this manually is that certain files must be there in place first before that happens.  The InstallShield setup process takes care of that for us.

When I attempted a install on a Windows 98 PC, just to prove VFP9 could run on it, I stumbled a lot at first trying to manually make it install.  You cannot just load the VFP9*.dll files to make it work-- it just will not happen on older  operating systems.  (It may on Windows XP, I'm not sure.)  It needs to have that goofy C dll (msvcr71.dll) in place as well as the GDIPLUS.dll that VFP9 makes heavy use in the area of report writing.  Once those were in place, I seemed to be able to manually register the main vfp9 runtime dll.  

But, again, when there are dependencies in one dll which require the presence of other DLLs to register properly, your install will fail every single time without those other DLLs in place.  As I mentioned earlier about InstallShield, when you choose the BFPRuntime.msm merge module, InstallShield is intelligent enough to determine those dependencies and it automatically selects the msvcr71.dll and the gdiplus one so that VFP9 will register and install properly.

 

by: CarlWarnerPosted on 2005-10-28 at 16:21:42ID: 15183302

Well, I just successfully made an InstallShield setup that installed the VFP9 runtimes on a virgin Windows 2000 PC.  I still have some issues as to where it ended up putting my original app executable.  But, that is because I didn't quite take the time to understand the terminology in InstallShield as they presented it to me.  I just guessed and figured it would all sort itself out when I ran the final setup on a fresh PC.  And I already had placed the executable and data files in its proper place on the local PC by extracting a .zip file I created from the app folder.  

Because I'm in a hurry, as most of us are, I really just needed InstallShield to place the latest Visual FoxPro 9 RunTime files on the PC so that I can successfully do the subject of the original posted question:  have the ability to open the .exe from anywhere without getting that annoying message of 'Cannot locate the microsoft visual foxpro library'.  The compilation process has nothing to do with getting that done.  It is the one-time (per latest Build from MS) installation of the VFP9 runtime files that is your main task and mine as well.  Once the runtime files are in place, we should all know what to do as VFP9 developers to supply just new .exe builds and potential table structure changes, etc.

I chose to have the final build of my InstallShield work go into a Single Image, which ended up producing about a 7Mb file
called SETUP.exe.  That way, a user on the other can run that and follow the simple standard prompts we are all used to
seeing when we install new "shrink-wrapped" commercial programs and go from there.

But, it seems your latest battle is to figure out what in the heck to put into the InstallShield gauntlet where it will produce something that works  I will attempt to tell you what to put in, even though I'm sure what I did wasn't perfect or the best sequence of events.  But, it gets it done and I don't have time right now to become an InstallShield expert.  I'm not even sure I want to be an InstallShield expert. <s>

Under Files in InstallShield's Specify Application Data area, I added a VFP9 executable that I created to so something could at least be tested once the rest of the files got registered and installed.  The good news is this exe you pick doesn't even have to be your main VFP9 executables you will be running either locally or off of a network server.  It can simply be a very small test exe that merely can get run that says, "Congratulations!  VFP9 works on your PC!" and then exists.  The whole point is to get VFP9 runtimes on the PC and this will get that done.  I found the exe file in the Source Computer's File area and dragged and dropped that exe file name into the Destination Computer's Files area.  Done with that.

Next, right below that Files choice is Redistributables.  To make a setup as small as possible with no extra fat where I might include connectivity driver files and XML, etc., I simply selected Microsoft Visual FoxPro 9 Runtime Libraries.  And, as I mentioned in an earlier post, the GDIPLUS and MSVCR71 stuff was automatically selected.  That's all I selected!

Under "Configure the Target System", I created a ShortCut and filled in a bit of info on what it wanted.  This is where I
would get my first clue that where it would put it wasn't the best place.  But, I didn't care-- it was just a placeholder test .exe and a throwaway after I tested that VFP9 was installed and working.

Then I really got going because I'm impatient and don't want to develop installation programs. <s>  I simply skipped all the way down to the Prepare for Release steps and chose Build Your Release.  After filling in a few areas under the Single Image choice, I right-clicked on Single Image and told it to "Build".  It goes through the steps and gives you a log file that you can see if there were problems.  I had no problems.  So, it created a good InstallShield build.  Last step, send it to a destination as the final Setup.exe file.  To get that done, simply go below where you were on the left treeview and choose "Distribute Your Release."  On the subsequent screen, choose the destination where you want that single image file and then click on the Distribute button.  That's it!!!  Of course, remember where you sent it. <g>

While this worked for me, I may have skipped a few filled-in areas to speed up this long answer to a simple question.  I
hope it gives you the will and confidence to get it done for yourself.

 

by: CarlWarnerPosted on 2005-10-28 at 22:36:46ID: 15184165

I looked back and saw the [INSTALLDIR] value in InstallShield default to c:\Program Files\ + CompanyName + an application folder name.  Way too much and not where I wanted the app executable loaded.  But, as I said, it was a temporary placeholder app that I could delete or move anyway.  I deleted all of that folder location once I saw VFP9 runtime was working.

 

by: CarlWarnerPosted on 2005-10-29 at 13:20:21ID: 15186061

This should apply to VFP9 as well:

Distributing VFP 8
http://www.alvechurchdata.co.uk/foxfiles.htm

Also, you and I both may want to run something that copies/moves or otherwise does anything but what InstallShield does after InstallShield is done doing its thing.  This KB link may provide us some help:

HOW TO: Run a Post Setup Executable with InstallShield Express
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q316907

 

by: MirkoLMVPosted on 2005-11-08 at 13:24:58ID: 15251588

There should be a compiler option for building stand-alone FoxPro applications, either in the Run/Compile menu (most probable, however) or in the environment set-up options (expected to be oud at the bottom of one of the rightmost menus). A stand-alone minimal FoxPro application would require more than 1 MB, because of FoxPro runtime to be enclosed.
The Help facility should provide at least some hints about compiling, especially on a FoxPro for Windows.

Good luck !

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...