Information générale
Catégorie:
Codage, syntaxe et commandes
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement