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 Chris Miller 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 before EXE executes 1

Status
Not open for further replies.

DanWalter

Programmer
Nov 29, 2000
58
US
Subject: Invalid path or filename BEFORE executable gets under way


Hello:
I have a real poser on my hands. A customer is getting a Windows
dialog of "Invalid path or filename" when trying to run any VFP 7 exe
that we ship him. There are at least 3 separate programs that we've
tried. He gets the dialog, then a VFP C05 error.


Workstation is XP, VFP is 7.0, SP 1.


Registry seems fine - vfp7r*.* shows up in the expected keys, and the
corresponding files exist on disk. Temp folder is fine - not read only
or hidden or full.


Exe's run fine for thousands of other customers. The total lack of
firing off VFP runtime is truly baffling.


Before I rip out all my hair - any ideas where to look?


TIA,
Dan

Dan Walter
Daniel.Walter@uvm.edu
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
A config.fp file may be sitting somewhere disturbing the whole thing. Or a foxuser resource file could be there.

You can make a wild search on the computer for config.fp and foxuser.dbf. Or you can create a config.fp in the same directory as the application and try and see what happens. A temp working directory path for example may not be existing.

Just my wild guess :)


____________________________________________
ramani - (Subramanian.G) :)
 
if I had access to this mashine I would try to run FileMon (Sysinternals) or Dependency Walker (Microsoft) - to get what file it tries to find.
Not sure it helps, though.
 
Thanks for all the helpful suggestions. The customer has "bailed" - he will install on a different machine. Personally, I suspect something corrupt in his registry. But now, we'll never know!

Dan

Dan Walter
Daniel.Walter@uvm.edu
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
I'm getting a similar error after insalling a program called SiteMaster built on VFP. After installing when I run the program I get the program error window with the statement "Invalid path or file name." If I ignore then I get the Microsoft Visual FoxPro error window as follows: Fatal error: Exception code=C0000005 @ date and time. Error log file... etc....

I've tried untinstalling using both the Remove Software and via the installer and then reinstalling. No dice.

I am running Win 2000 fully updated Also I am able to install the progam from the same installer file on other Windows 2000 machines, so that means there is a problem with this machine.

I searched as suggested above to make sure the config.fp and foxuser.dbf files do not exist. They don't.

Now I'm at a loss how to resolve...

TIA
BB
 
Invalid path" usually means that something internally is looking for a resource (Foxuser) file on a drive that doesn't exist, or is restricted.

Do the machines that fail have any configuration differences? (i.e. no C: drive, etc.)
 
dialog of "Invalid path or filename" when trying to run any VFP 7 exe that we ship him. There are at least 3 separate programs that we've tried. He gets the dialog, then a VFP C05 error.

This has nothing to do with config.fpw or foxuser.dbf. If your install creates a subfolder in program files, lets say “Myapp”, somehow it has created another “myapp” in “myapp”. Or it has been installed in another subdirectory by the user.

Your paths are all screwed up if you are setting the path with
set path to \myapp\<<databases>>

In situations like this allow the user to select the correct path. I would check where the app is bing installed by the user and what your path statements say…

Though this would not give you the C05 error, unless some library is being set with Set Classlib in your initial program….
 
Makes me wonder if there is a table the Apps reads when program first starts up and set memvar to the paths in the tables.

Then some of those directories in that table/memvars do not exist.

 
Thanks for all your thoughts. The app is only installed in Program Files and ther are not mistaken paths. I've checked the path under environment variables under System properties to make sure it was OK, and even added a path direct to the app directory just to make sure. No dice.

App vendor says the program when it starts it first writes temporary files to the root directory C:/ and the program won't start without these temp files. I don't get these files when I start, only the path error. I asked specifically if it was the app or the install program that created the temp files and he say the app. The app bails out to invalid path before any window or graphic or anything visible happens. I'm running as administrator, so that doesn't seem to be the issue. BTW the app in running on VFP8.

I haven't been able to check the specifc config of either of the other two machines I installed the app on to test the install, but both are nominally configured the same. All have C drives. And all users are either adminstrator or standard users with rights to install software. The machine that won't install on is being run from Administrator. I'll check this over the weekend, but I don't think this is the answer.

I'm still open to ideas.
 
A suggestion: ask the vendor the name of the temp files, create them yourself, then try to install the app.
 
Wild guess:

try following commmand in dos prompt for all the missing drives between a to f after creating a FoxTmp foldfer on a accessible drive.


md c:\FoxTmp

subst b: c:\FoxTmp
subst d: c:\FoxTmp
and so on ...


Also insert a working media in a CD ROM.


Also check if there is a non formatted partition by going to My Computer, Manage, Disk Management.


try it

Nasib Kalsi



 
bmb2:
What I don’t understand, is that it is running on other machines but not one. The only things that come to mind are:

Normally; a lot of software companies in the First line of the start up program (especially apps written in VFP) will have the following to make sure the default path is set to the directory that has the app in it.

Code:
Set default to Addbs(Justpath(Sys(16))) 
or
Set Default To Sys(5)+Sys(2003)
This tells the app to set the default directory to where it started from

I am sure you are not, but are you double clicking the “Exe” in windows explorer to start the app? If you are it will bomb as now it does not know the default.

If starting from an Icon on the desktop check the properties and ensure that the “Start in” is set correctly.

Cannot think of anything else... Good Luck.
 
OK, I've got it running.
I tried a bunch of stuff that you all suggested, but what I think got things running was to delete all the path info from the environement variables (I saved it first). I did however previously create the FoxTmp directory, but the subst command wouldn't work in the DOS version loaded. I did put working media in the CD drive. So now I'm doing to rd the FoxTmp, remove the media and add back the path info for other programs one at a time to see what happens. Thanks for all you help. I'll post more when I find the exact culprit.
Thanks again.
bmb2
 
OK here is the follow up. Simple.
The path environment variable settings had been corrupted. I had checked the rather long list there and missed this. There was a %SystemRoot% phrase in one of the paths that was culprit. Can't say as how it got there, but there it was. Delete that and everything works like it should. Didn't seem to effect other programs, so I still don't quite understand why this one crashed, none the less it did.
Simple problem, simple solution, long time getting there.
Thanks agains for all your suggestions.
Hope someone else can learn from my pain a bit faster than I did.
bmb2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top