Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Overwriting active .EXE
Message
 
 
À
21/06/1997 13:05:48
Primoz Pisk
Impulz D.O.O. Kranj
Kranj, Slovanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00037317
Message ID:
00037320
Vues:
32
>I'd like to add a self-upgrapdable option into my FoxPro application. It means there would be a menu item inside application like "Upgrade to a new version" and when my user get - for example - a diskette with MYAPP.EXE, the active program simply copy this file from diskette onto active program location, located with SYS(16,0) function.
>
>Some compilers load the EXE program into memory, so overwriting the active program isn't problem at all; the user just have to restart the application and that's all. In FoxPro it's not so simple, because the EXE program is a kind of locked file - renaming, deleting and overwriting isn't possible until we quit the application.
>
>I know I could make a special EXE program for making upgrades, but let's say I don't like it. I know I could run my program within some .BAT file (in DOS environment) and after the application stopped, there could be another .BAT file, handled by MYAPP.EXE. I don't like this solution either, specially for Windows version and Visual FoxPro environment.
>
>So - is there an idea how to delete, rename or overwrite the active FoxPro program.
>
>Thanks,
> Primoz.


Primoz:

Paul suggestion is a very good one. In fact I remember reading of this technique in a FoxPro Advisor article several months ago. The way it worked is similar to the way Paul explained. The author kept all executables (program files) on the local (C:) drive and the data on a server (for multi-user). He also set up a sub-directory on the server where new (updated) program files were placed. The only executable that was never changed was the one initially launched by Windows. The executable did minimal setup work and always looked for new program files on the server. If it finds any, it copies them to the C: drive, then starts the "real" program. You never have any overwrite errors because you are no longer concerned about running multi-user apps from the server. All programs/apps/executables are run directly from C: which is also better for performance anyway.

HTH.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform