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

Windows Profile changed now broken link errors to files

Status
Not open for further replies.

jamesiv

MIS
Mar 15, 2005
12
0
0
US
I took over someones job at a company and they had programmed with a lot of loose links to files all over the place on their C: drive. If I login as the old user and run the foxpro 9 program things run find and I can compile an .exe file fine as well.

When I login under an administrator account on the pc and try to run or compile the foxpro app i start getting all kinds of errors relating to finding forms etc. Thing is the form references look fine as they are to the root c:\ drive and not under the other users profile my docs or anything.

Does FoxPro9 have some other issues or settings I need to be aware of when moving locations of programs or in this instance just using a new login to a pc to develop from?

When I compile the program runs fine. If I click on Main.prg and try to run which is the startprogram it throws this error:

File 'C:\tasi\progs\splash.scx' does not exist
and throws to this line of code:

DO FORM splash.scx

well the splash.scx is not in the c:\tasi\progs directory but the c:\tasi\forums directory so why would me changing the profile of this machine cause so much trouble?

Maybe something with the includes within the .prg files themselves? I'm new to FoxPro so any help is greately appreciated. Thanks everyone in advance.
 
I think your best bet is to clean up the mess that was left behind.

Try the following.

0) Copy all the files you need into a nice, new, clear folder hierarchy that makes sense. One common way to do things in VFP is to have a main folder for a project and folders beneath it with names like Forms, Programs, ClassLibs, etc.
1) Open VFP and CD to your new root directory.
2) Create a new project: CREATE PROJECT MyNewProject
3) Add the main program of the project.
4) SET PATH TO all the folders that contain files for this project.
5) Click Build in the Project Manager. Then choose Rebuild Project.

All the files that are used will be added to the project. The only issue is that some files may be used indirectly (through macro expansion or name expressions), so once to build an APP or EXE, you'll have to test that everything you need is there.

Tamar
 
Thanks for the reply. I can try and do this but these applications are extremely complex and robust. I was wondering if you could help me understand why FoxPro handles a Windows profile change like this? What is the root cause of this type of issue?

Thanks again for your help! I really appreciate it.
 
I don't really know why you're running into this problem. One possibility is that the other user has stored information that sets up paths and things. This could be either a FoxUser.DBF for the user, or a Config.FPW file.

Tamar
 
One thing to keep in mind is that fox can find files in the system search path too. Chances are, the other developer had some paths set up in their 'System Properties'->'Environment Variables'.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top