Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can program know it's own name?
Message
De
16/10/1999 00:35:25
 
 
À
16/10/1999 00:30:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00276686
Message ID:
00277190
Vues:
36
Now I've tested it:

SYS(16) works perfectly for giving the name of the EXE regardless of how you've renamed it.

>What about SYS(16)? ... Also, what about putting a PARAMETER as a default in the startup program with the true name and then storing that to a public object?
>
>>>>Is there any way that I can determine the name of an EXE file after it begins executing?
>>>>
>>>>Peter Robinson
>>>
>>>Peter, take a look at PROGRAM() and SYS(16)
>>>
>>>Nick
>>
>>
>>Nice try. I thought you had it there. Unfortunately PROGRAM(0) and PROGRAM(1) give the name as the program was originally compiled (STARTUP). If I copy the file STARTUP.EXE to a new file ANYNAME.EXE and execute ANYNAME, my WAIT WINDOW display 'STARTUP' not 'ANYNAME'.
>>
>>In case it not obvious where I want to go with this, I want the Startup program to pass control to a program with a name similar to the EXE file. That way I need only one copy of STARTUP.EXE to start many different programs.
>>
>>Peter
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform