HOME() returns "C:\WINDOWS\SYSTEM" ? 
Author Message
 HOME() returns "C:\WINDOWS\SYSTEM" ?

I have compiled my VFP5 Application into standalone EXE. When I run
the EXE in its own directory the HOME() function returns
"C:\WINDOWS\SYSTEM" instead of the directory I started the EXE from.
Does anyone know why?  

HOME() worked fine while I was developing the App because it returned
the Foxpro directory. However in runtime, it won't return the
application directory.

Thanks,
Whit



Sun, 27 Aug 2000 03:00:00 GMT  
 HOME() returns "C:\WINDOWS\SYSTEM" ?

Whit,
You could also use SYS(16) and strip off the code file name (e.g. use
JUSTPATH() from FOXTOOLS).
Rick


Quote:
>I have compiled my VFP5 Application into standalone EXE. When I run
>the EXE in its own directory the HOME() function returns
>"C:\WINDOWS\SYSTEM" instead of the directory I started the EXE from.
>Does anyone know why?

>HOME() worked fine while I was developing the App because it returned
>the Foxpro directory. However in runtime, it won't return the
>application directory.

>Thanks,
>Whit



Sun, 27 Aug 2000 03:00:00 GMT  
 HOME() returns "C:\WINDOWS\SYSTEM" ?

Whit,

HOME() is saying that because that's where VFP500.DLL is loading from. In the sample file
spyin.zip on my website is some code used to detect the folder where your .exe resides for
the runtime environment.

df    - (Microsoft FoxPro MVP) http://www.geocities.com/ResearchTriangle/9834/

Quote:

>I have compiled my VFP5 Application into standalone EXE. When I run
>the EXE in its own directory the HOME() function returns
>"C:\WINDOWS\SYSTEM" instead of the directory I started the EXE from.
>Does anyone know why?

>HOME() worked fine while I was developing the App because it returned
>the Foxpro directory. However in runtime, it won't return the
>application directory.



Mon, 28 Aug 2000 03:00:00 GMT  
 HOME() returns "C:\WINDOWS\SYSTEM" ?


Quote:
>I have compiled my VFP5 Application into standalone EXE. When I run
>the EXE in its own directory the HOME() function returns
>"C:\WINDOWS\SYSTEM" instead of the directory I started the EXE from.
>Does anyone know why?

>HOME() worked fine while I was developing the App because it returned
>the Foxpro directory. However in runtime, it won't return the
>application directory.

>Thanks,
>Whit

Try to issue set default to
in your main program...
Osmar


Sun, 03 Sep 2000 03:00:00 GMT  
 HOME() returns "C:\WINDOWS\SYSTEM" ?

Quote:



>>I have compiled my VFP5 Application into standalone EXE. When I run
>>the EXE in its own directory the HOME() function returns
>>"C:\WINDOWS\SYSTEM" instead of the directory I started the EXE from.
>>Does anyone know why?

>>HOME() worked fine while I was developing the App because it returned
>>the Foxpro directory. However in runtime, it won't return the
>>application directory.

>>Thanks,
>>Whit

>Try to issue set default to
>in your main program...
>Osmar

Try see HELP index  Config.fpw


Sun, 03 Sep 2000 03:00:00 GMT  
 HOME() returns "C:\WINDOWS\SYSTEM" ?

[ Courtesy cc'ed through e-mail to the quoted authors ]

Quote:


>>I have compiled my VFP5 Application into standalone EXE. When I run
>>the EXE in its own directory the HOME() function returns
>>"C:\WINDOWS\SYSTEM" instead of the directory I started the EXE from.
>>Does anyone know why?

>>HOME() worked fine while I was developing the App because it returned
>>the Foxpro directory. However in runtime, it won't return the
>>application directory.

>Try to issue set default to
>in your main program...
>Osmar

And in second message added:

Quote:
>Try see HELP index  Config.fpw

while the question Whit asked was "Why HOME() returns "C:\WINDOWS\SYSTEM"
instead of directory I started application in?"

The answer to that question is again in on-line help.  A quote:

[  HOME() == ] SYS(2004) returns the location of the .ESL file in a distributed
run time Visual FoxPro application created with the Professional Version of
Visual FoxPro.

To get directory you started application in (== startup directory in the
properties of shortcut) use SYS(2003) in combination with SYS(5) to get current
drive or put it elsewhere (CONFIG.FPW, custom configuration file) and read it
after program started, as Osmar seems to suggest.

[ When replying, remove *'s from address ]
Alexandre Pechtchanski, Systems Manager, RUH, NY



Sun, 03 Sep 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. ?How to move cursor to "Home"

2. "home-made" navigation

3. Challenging problem with "return to"

4. Local View Returning "Syntax Error"

5. System hangs on "USE" statement

6. System Menu "View" problem

7. "Executing Remote" wait window

8. help: "growing" a window

9. question about "Foxpro for windows"

10. ZOOM WINDOW "Report Designer" MAX

11. "wait window" font

12. WAIT NOWAIT WINDOW "processing..."

 

 
Powered by phpBB® Forum Software