Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine where the exe reside?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00622136
Message ID:
00622153
Views:
18
Try
SYS(16,1)
You'll have to extract path from the app full name so.

>Hi!
>
>I want to know how my VFP application can determine where it resides?
>
>I have two apps, a FPW26 app calling a VFP5 app. My current dir is C:\FPW and the whole VFP stuff resides in the C:\VFP dir.
>
>In FPW I do: RUN /N4 C:\VFP\VFP5.EXE
>
>In the VFP5 application, the function HOME() gives "C:\FPW\" and SYS(2004) gives "C:\WINDOWS\SYSTEM32\" I guess it's because VFP500.DLL is in that directory.
>
>I'm asking this question because I want to SET LIBRARY TO FOXTOOLS in the VFP app and I cannot locate FOXTOOLS because it's in the directory where the vfp app resides and that dir is not in the current dir (C:\FPW) nor in the VFP path.
>
>I know that if I place FOXTOOLS.FLL in C:\WINDOWS\SYSTEM32 I will find it but isn't it bad practice writing in that directory?
>
>When the users will install on their PC, will they need administrator rights to write there?
>
>TIA
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform