Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine EXE Home directory.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00550132
Message ID:
00550448
Vues:
24
>>>I have compiled an EXE of my App and created a Setup disk using the Setup Wizard. I included the VFP Runtime files when running the Wizard. The setup defaults to installing into c:\program files\labnav. I think I see the Vfp6r.dll and other runtime files getting installed to the Windows\System directory. In code, I need to determine the folder from where my EXE is running. I know Sys(2004) returns the folder of the Runtime files, but how do I determine where my program is launched from? What I'm trying to do is delete some temporary tables and TXT files that get created in the lauch directory.
>>>
>>>Thank You
>>
>>SYS(16,1) will give you the name and path to your EXE.
>
>Thank you very much, I think that will work perfectly. Can you tell me if it's common or uncommon to put these kind of "temporary" files in my program directory? I know there's always the good ol' Windows\temp folders, but this was easier in my code overall, and I didn't want to have to rely on the ...\temp folder being there. Do you see any problems with this thinking?

I agree with Al. It is OK if you keep your temporary tables and files in application directory. It may be also another TEMP directory under your application directory.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform