Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Overwriting active .EXE
Message
De
21/06/1997 13:18:24
 
 
À
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:
00037318
Vues:
41
The easiest way I know: make a program that will call your exe (eg: the user will execute first the launching program that will run your exe.) From your menu option: copy the new exe file with a different name. The launching program must:
1. Look for a new version of exe and if finds it:
2. Delete the old version
3. Rename the new version with the correct file name
4. Run the exe.

Be careful when you use this technique with a network app.

Vlad

>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform