Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# update updater application

Tags:

c#

auto-update

I created my own updater application that connects to the web and check if my application with all the files is updater or not and download and install the updated components.. and works fine and is ok! My question is this... is there any way to update the updater? I don't know how, but something that close the program, uncompress the downloaded updater and relaunch it...

thanks in advance!

Paolo

like image 801
ghiboz Avatar asked Sep 17 '25 04:09

ghiboz


2 Answers

Not that I ever tried... but the updater could copy itself to a different location and then invoke itself. I'd reccomend making a backup in case something goes wrong. From the new location, the updater can happily overwrite its own executable.

I would probably do like this.

Suppose there are two files:

Updater.exe & MainProgram.exe

Updater.exe downloads all the new versions in your program folder and replaces the old files. When your updated MainProgram i.e., the application's welcome screen runs, let it connect to the Internet and update the Updater.

So this is like: First the Updates updates other files than one of the new files, when run, updates the Updater.

like image 45
RKh Avatar answered Sep 19 '25 21:09

RKh