Self update

  • Thread starter Thread starter Jamey McElveen
  • Start date Start date
J

Jamey McElveen

Another quick question. I have seen applications like Reflector that can
perform a self update. How can I replace the currently running executable
with another file downloaded from an update location? I have tried
disasembling Application.Restart() and writing the new file in the process
gap but that does not work. I figgure there must be some best practrice for
this?

Thanks
 
Hi,

message | Another quick question. I have seen applications like Reflector that can
| perform a self update. How can I replace the currently running executable
| with another file downloaded from an update location? I have tried
| disasembling Application.Restart() and writing the new file in the process
| gap but that does not work. I figgure there must be some best practrice
for
| this?

This is the solution I'm using in a PPC application. The application check
for an update in a website, if one exist it downloads it. It's usually a
couple of files zipped. after unzipping them in a temp folder I execute the
real "updater app" and as a parameter I pass the process ID of the calling
(the app being updated). The updater terminate the calling process and then
just go on and copy the new .exe (it was downloaded too) to the correct
location. Finally execute it.


Super simple and works like a charm :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top