Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TMP files hanging around..
Message
 
To
03/09/1997 16:58:41
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00048372
Message ID:
00048463
Views:
28
>I have a 'launcher' application run my APP. This controlling EXE creates a cursor or two while loading. Since this EXE does not get control back from the APP, it never cleans up after itself (the TMP files). How can I force it to clean up these files?

Gino,

It depends on whether the TMP files being left behind are the result of creating the cursors or temporary files that FoxPro creates automatcially. If it's the former, a CLOSE ALL on exit should do it. However, if it's the latter, then creating a procedure or non-visual class in the controlling EXE to handle the shutdown will do the trick. For example, a SET PROCEDURE TO MyProc will make the procedure file available to any called application. All you have to do is add the procedure file to the called applications, but mark it as excluded. When the shutdown procedure is called, control is returned to the EXE. Of course, if you close the procedure file in the application it won't work.

I took the solution to this problem a step further. On startup, my application creates a batch file to delete left behind TMP files. If the user exits normally, the shutdown routine deletes it. However, if they exit by either re-booting or turning the machine off, the batch file is left behind. My installation routine inserts lines in the user's AUTOEXEC.BAT to look for the file, and if present execute it. If it's found, AUTOEXEC.BAT will delete it after execution.

HTH,

George
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform