Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How determine strartup folder inside app started from VF
Message
De
30/09/1998 08:46:04
 
 
À
30/09/1998 08:03:18
Dmitry V.Glouzdov
LUKOIL (Nizhny Novgorod)
Nizhny Novgorod, Russie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00142271
Message ID:
00142322
Vues:
33
>Hi!
>
>1) >You can find the starting directory (the directory active at the time the application starts up) with FULLPATH(CURDIR()). You need to do this before you do any CD or SET DEFAULT TO
>
>>
>2) >You can find the path of the executable with SYS(16,0); you'll need to strip the program name from the path returned.
>
>1) Will be betterif I will not use SET DEFAULT TO

As long as you save where you started from before you change directories, it shouldn't matter. The value of CURDIR() will change whenever you change directories, so simply saving it before it's been changed works just fine.

If you don't SET DEFAULT TO or CD, CURDIR() should remain the same; I've seen situations where VFP's file save context has been changed by some GETFILE() and GETDIR() calls, but CURDIR() doesn't seem to get affected.

>2) ...last text lins from VFP help for SYS(16) - Executing Program File Name:
>
>"When the executing program is part of an application (.APP), SYS(16) returns only the name of the program — the path isn’t returned with the program name."
>
>... but it`s work!
>
>Thank you for prompting!
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform