Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine EXE Home directory.
Message
 
À
29/08/2001 01:24:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00550132
Message ID:
00550771
Vues:
22
>>>>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?
>
>It's normal to let Windows put "true" temp files in its temp folder. "Temporary" tables you may create (i.e. with CREATE TABLE then delete later) go into the folder specified by SYS(5)+CURDIR() (i.e. SET DEFAULT) unless you explicitly specify otherwise.
>
>Have you looked into using cursors (CREATE CURSOR etc.) rather than temp tables? When closed VFP will automatically delete them for you.

I need to look at using the SYS(5)+CURDIR() command. I didn't know about that one.

Aren't cursors read only prior to VFP 7? The user has to be able to update these tables during the procedure. I'm still on VFP 6.0. Haven't made the leap yet.

Thank you
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform