Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding the Directory of Exe
Message
De
28/08/1997 09:42:39
 
 
À
21/08/1997 18:02:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00046135
Message ID:
00047323
Vues:
23
Thanks Paul,

SYS(16) is exactly what I was looking for. Thanks again for the suggestion.




>Use SYS(16,0). It returns the name of the current program including the path. You must only extract the path from it.
>
>Vlad
>
>>I have two exe's. The first exe begins running, then it calls the second exe with a DO command. For example:
>>DO &path.commonrpt.exe WITH parameter1, parameter2
>>
>>I am trying to find a way the second program can locate itself so that I can tell it where to find an init file without any hard coding.
>>
>>When I use the GetCurrentDirectory() Win32Api call, it returns the path to the original calling program. If I run commonrpt.exe on its own this function works well.
>>
>>FULLPATH("commonrpt.exe") and LOCFILE("commonrpt") do not work because if the file is not found in the default or paths then it will either return the default directory with commonrpt.exe attached to the end or an open dialog box. Either the data is incorrect or the automatted process halts with a dialog box.
>>
>>I don't want to pass the path to the exe as a parameter of the DO command.
>>
>>Does anyone have any suggestions or solutions??
>>
>>Thank You,
>>Michael
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform