I have an executable that takes a filename parameter, this makes it so I can
double click on a file and it starts my program. The problem that I am
having is that it starts the program with the default directory being where
the file was and not where my executable is. I have looked through the home
function and can't get it to show where my executable is. How can I figure
this out?

--
Altman
VFP8 SP1

"No matter how foolproof you make a system, 'fools' can be remarkably
ingenious."

Re: Find directory of my executable by Eric

Eric
Fri May 21 14:33:46 CDT 2004

Hello, Altman!
You wrote on Fri, 21 May 2004 13:58:07 -0500:

A> I have an executable that takes a filename parameter, this makes it so I
A> can double click on a file and it starts my program. The problem that I
A> am having is that it starts the program with the default directory being
A> where the file was and not where my executable is. I have looked
A> through the home function and can't get it to show where my executable
A> is. How can I figure this out?

In your main prg:
lcFolder = JUSTPATH(SYS(16))

In the rest of your program:
lcFolder = JUSTPATH(_vfp.servername)
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: Find directory of my executable by Rolf

Rolf
Fri May 21 14:42:20 CDT 2004

> I have an executable that takes a filename parameter, this makes it so I
can
> double click on a file and it starts my program. The problem that I am
> having is that it starts the program with the default directory being
where
> the file was and not where my executable is. I have looked through the
home
> function and can't get it to show where my executable is. How can I
figure
> this out?
>

sys(16,0) = location + file name
justpath(sys(16,0)) = location




Re: Find directory of my executable by Doug

Doug
Fri May 21 15:42:35 CDT 2004

Altman,

Does application.fullname work for you?

Best,

DD

"Altman" <NotGiven@SickOfSpam.com> wrote in message
news:OsIDPW2PEHA.2976@TK2MSFTNGP10.phx.gbl...
> I have an executable that takes a filename parameter, this makes it so I
can
> double click on a file and it starts my program. The problem that I am
> having is that it starts the program with the default directory being
where
> the file was and not where my executable is. I have looked through the
home
> function and can't get it to show where my executable is. How can I
figure
> this out?
>
> --
> Altman
> VFP8 SP1
>
> "No matter how foolproof you make a system, 'fools' can be remarkably
> ingenious."
>
>



Re: Find directory of my executable by Altman

Altman
Fri May 21 17:09:37 CDT 2004

thanks, I looked through the SYS stuff but there are so many of them I must
have overlooked it.
"Eric den Doop" <ericdendoop@xspamblockxfoxite.com> wrote in message
news:u$cGKq2PEHA.3988@tk2msftngp13.phx.gbl...
> Hello, Altman!
> You wrote on Fri, 21 May 2004 13:58:07 -0500:
>
> A> I have an executable that takes a filename parameter, this makes it so
I
> A> can double click on a file and it starts my program. The problem that
I
> A> am having is that it starts the program with the default directory
being
> A> where the file was and not where my executable is. I have looked
> A> through the home function and can't get it to show where my executable
> A> is. How can I figure this out?
>
> In your main prg:
> lcFolder = JUSTPATH(SYS(16))
>
> In the rest of your program:
> lcFolder = JUSTPATH(_vfp.servername)
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
>
>