>Hi. VFP6 user here. I have a compiled app that I am installing on my workstations with VFP Runtime installed. I have my exe stored in a directory on my server and foxtools.fll is in the same directory.
>In the startup program of my project, I have SET LIBRARY TO foxtools.fll.
>My desktop icon has a start path of the directory where my exe resides.
> To give an example, I ran the EXE from a Win98 workstation and it was looking for foxtools.fll in the c:\program files\microsoft visual studio\vfp6 directory. I went into Explorer, created those directories, placed foxtools there, and all ran fine. I would not call that a "user friendly installation".
> Does anyone have a suggestion??
I usually have a "do CkFoxTools" in the .load of my major classes (forms, toolbars, managers). Here's the source:
If Atc("foxtools", Set("library"))=0
cFoxTools = Fullpath('foxtools.fll')
If Not File(cFoxTools)
cFoxTools=Forcepath("foxtools.fll",Sys(2004))
Endif
If File(cFoxTools)
Set Library To (cFoxTools) Additive
Endif
Endif
So it has to be somewhere along the Fox path (then fullpath will find it) or on the launch directory (from help: "SYS(2004) returns the location of the Vfp7r.dll or Vfp7t.dll file in a run time Visual FoxPro application.").
You can't use this exactly as it is in VFP5, because back then, forcepath() was still a FoxTools function and at this point we still don't have Foxtools loaded. I still recommend having FoxTools on the same directory as the executable, because you may have executables compiled with different versions of VFP (and Foxtools) on the same disk, and if it was on any system directory, you run a chance of some executable using a wrong version.