Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy newer Exe over running Exe
Message
De
17/09/2008 07:23:05
 
 
À
17/09/2008 06:23:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2008 Server
Database:
Visual FoxPro
Divers
Thread ID:
01348141
Message ID:
01348155
Vues:
17
>I want to add the option to my users of downloading a newer version of my program and over writing the current version with the new one but windows won't allow me to copy over a program while it is running.
>The idea is for the program to check for updates, download the update and then copy it over the older version.

John,

There's no way an exe can overwrite itself

A couple of possibilities
(1) Download the new version, exec another program that copies the downloaded exe over the old, then exec your program again
The exec can be done in foxpro - but you have to write some code
It can also be done with vb scripting - see parts of http://www.west-wind.com/presentations/wwCodeUpdate/codeupdate.asp

(2) not tested - you could use a .App file to download
Your exe
....

do while TRUE
    do xxxx.App
    if( new version )
         clear program
         copy ....app to xxxx.app
        loop
     endif

  exit
enddo
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform