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

Invalid path or Filename error on Windows XP 1

Status
Not open for further replies.

courtware

IS-IT--Management
Oct 22, 2001
6
US
Hello!,

I'm currently getting an invalid path or filename error every time I run a foxpro 2.6 application under Windows XP.

Does anyone know of a fix for this?

Thanks in advance!
 
Is this a FoxPro DOS or FoxPro for Windows application? What file system are you running on XP? (FAT32 or NTFS) Have you tracked down exactly what file is causing the problem? (The .EXE or .APP, the short cut, a batch file that starts it, the CONFIG file, a table)
What directory do you have the application and/or the data files in?

Please remember FP doesn't know about (or work with) Long File Names - your best chance at starting the application up is to put it in a directory where none of the subdirectories have embedded spaces or are longer than 8 characters.

Rick
 
Thanks Rick for the reply.

The application is a foxpro 2.6 for Windows program. It resides on a NTFS file system that's 40gb. It's not in a directory using long filenames. The shortcut I'm using is an .exe in the target. The Microsoft FoxPro window opens then the error occurs. I'm not sure if its the .app or in the .exe.

I'm running on a Dell machine 800mhz, with 256mb of memory and the DZpatch was applied.

I'm not sure what else to try...

Jeff
 
Hi Jeff,
OK, assuming your shortcut just has the FPW application name and not something like:
C:\Appdir\MYAPP.EXE -cC:\Appdir\Config.fpw

Then check to see if there is a CONFIG.FPW in your C:\Appdir\. You can open it in Notepad (it's just a text file). There may be one to many lines in here, look for any that reference a drive or directory not on (or mapped on) this workstation. The more important ones are RESOURCE, DEFAULT, PATH, and TMPFILES.

Rick
 
Thanks! Rick,

Here is the contents in config.fpw

MEMLIMIT=50,4096,10240
DOSMEM = OFF
KEYCOMP = WINDOWS
MVCOUNT = 3000
EXCLUSIVE = OFF
DELETED = ON
TYPEAHEAD = 128
SAFETY = ON
STATUS BAR = ON
CENTURY = ON
CLOCK = STATUS
CATMAN=OFF
RESOURCE = OFF
HELP = OFF
_FOXDOC = ""

As you can see there is no path, tmpfiles, default listed. Should there be?

Thanks!

Jeff
 
Jeff,
Assuming there isn't another CONFIG.FPW file that it's finding, then I'd say it's got to be actually in the program code. I've left "hardcoded" paths in my code both by mistake and on purpose. For example, the program may be checking for a support file in a system directory (C:\WIN95\SYSTEM\), or it may assume there is a C:\TEMP\ as the temporary directory (XP sets one up for each user - mine is C:\Documents and Settings\Rick\Local Settings\Temp\). I've also used this technique (hardcoded path) as a way to insure the user actually installed the application using my install routine rather than simply copying it to another system - sort of a poor man's copy protection. (I usually created a hidden system directory in this case.)

If you don't have the source code, I'd try contacting the application's distributor or developer.

Rick
 
Thanks! Rick for all your help. I'll post back once the code is reviewed.

Jeff
 
Hey Rick!,

I have gotten the code reviewed and it seems the program is using the "run" command quite a bit. I think the problem is that when the cmd.exe (DOS)is used it defaults to a directory that is using long file names. I can't seem to find where to change this default in XP.

We did run a test with a foxpro 2.6 application not using the "run" command and it worked great.

The default directory that the DOS prompt goes to is "c:\Document and Settings\jeffp\.

Are you using the "run" command successfully on XP?

Thanks!,

Jeff Parker
 
Hello Rick,

Never mind! I found the problem. I had a ";" missing from my path statement. It's all working fine now on XP.

Thanks for all your previous help.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top