Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine An APP's Install Location
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00603607
Message ID:
00603662
Views:
26
Hi Kevin.

>Anyknow know an API or other routine for determine the install
>location of an application?
lcPath = justpath(sys(16, 0))
if atc('PROCEDURE', lcPath) > 0
    lcPath = substr(lcPath, rat(':', lcPath) - 1)
endif atc('PROCEDURE', lcPath) > 0
If you need to determine the path of another application (ie. one VFP app locating another or a non-VFP app), then you need to hope that the other app has written information about its location to the Registry. A common place apps do that is HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\EXE name.

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform