Board index » delphi » Upgrade Feature

Upgrade Feature


2004-11-16 10:07:14 AM
delphi116
Hello-
I'm in the process of making an internet upgrade feature, and I have
it where I can download the upgrade executable file. Would someone know
how to replace the currently running application with the downloaded
file that replaces it without a I/O error?
In other words I am running foobar.exe and downloaded it is new copy, how
do I make the replacement?
Thank You
Greg
 
 

Re:Upgrade Feature

Greg Kraft writes:
Quote
Hello-
I'm in the process of making an internet upgrade feature, and I have
it where I can download the upgrade executable file. Would someone know
how to replace the currently running application with the downloaded
file that replaces it without a I/O error?
In other words I am running foobar.exe and downloaded it is new copy, how
do I make the replacement?
You have to lunch an "update" application that is smart enught to know
what file to replace. Forget of update from inside your app.
Greets
Lic. Pablo Zagni
www.z-system.com.ar
Buenos Aires, Argentina
 

Re:Upgrade Feature

Quote
I'm in the process of making an internet upgrade feature, and I have
it where I can download the upgrade executable file. Would someone know
how to replace the currently running application with the downloaded
file that replaces it without a I/O error?
In other words I am running foobar.exe and downloaded it is new copy, how
do I make the replacement?
Thank You
Greg
Well, there's bodges you can do. Your app can download the upgrade & store
it in a temp file, eg. temp.exe. You can shell the 'temp.exe' with a
command-line parameter that tells the update to sleep for, say, 30 seconds
on startup. This gives the old app time to shut down. When the new app has
finished its sleep, it can rename the old exe, copy itself, (it can read its
own exe), to the correct filename & do the same 'shell-delay' trick to start
up, effectively itself, but from the new file with the correct name. The
new, updated exe can then delete the temp file.
All in all, it is safer to use a seperate 'update' app, as suggested ny
Pablo. If you use a self-updater, one day you will download a duff exe &
kill off all your customers. The nyou have to go round each one with
instructions on how to restore the old version - yuk!
Rgds,
Martin
 

Re:Upgrade Feature

OK, thanks for your help!
Greg
Martin James writes:
Quote
>I'm in the process of making an internet upgrade feature, and I have
>it where I can download the upgrade executable file. Would someone know
>how to replace the currently running application with the downloaded
>file that replaces it without a I/O error?
>In other words I am running foobar.exe and downloaded it is new copy, how
>do I make the replacement?
>Thank You
>Greg


Well, there's bodges you can do. Your app can download the upgrade & store
it in a temp file, eg. temp.exe. You can shell the 'temp.exe' with a
command-line parameter that tells the update to sleep for, say, 30 seconds
on startup. This gives the old app time to shut down. When the new app has
finished its sleep, it can rename the old exe, copy itself, (it can read its
own exe), to the correct filename & do the same 'shell-delay' trick to start
up, effectively itself, but from the new file with the correct name. The
new, updated exe can then delete the temp file.

All in all, it is safer to use a seperate 'update' app, as suggested ny
Pablo. If you use a self-updater, one day you will download a duff exe &
kill off all your customers. The nyou have to go round each one with
instructions on how to restore the old version - yuk!

Rgds,
Martin




 

Re:Upgrade Feature

OK.
I think what I will do is shellexecute a self-extracting zip archive
(which has the ability to start the setup program) then end the main
program after that starts.
Thanks!
Greg
Pablo Z writes:
Quote
Greg Kraft writes:

>Hello-
>I'm in the process of making an internet upgrade feature, and I have
>it where I can download the upgrade executable file. Would someone
>know how to replace the currently running application with the
>downloaded file that replaces it without a I/O error?
>In other words I am running foobar.exe and downloaded it is new copy,
>how do I make the replacement?


You have to lunch an "update" application that is smart enught to know
what file to replace. Forget of update from inside your app.

Greets
Lic. Pablo Zagni
www.z-system.com.ar
Buenos Aires, Argentina
 

Re:Upgrade Feature

Greg Kraft writes:
Quote
Hello-
I'm in the process of making an internet upgrade feature, and I have
it where I can download the upgrade executable file. Would someone know
how to replace the currently running application with the downloaded
file that replaces it without a I/O error?
In other words I am running foobar.exe and downloaded it is new copy, how
do I make the replacement?
Thank You
Greg

I found some software
scalabium.com/sminet
lgman.freeyellow.com/
www.chithai.com/delphi/ezupdate
www.5group.com/en/liveupdate FREEWARE
lgman.freeyellow.com/ FREEWARE
www.npsnet.com/waletzky FREEWARE
hem.passagen.se/masdelphipage FREEWARE
.... chech www.torry.net/pages.php for more!
Pablo