Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to make a self-updatable executable in windows?

Tags:

windows

I would like to produce an executable that could make an update verification before it loads, and then, if there is some update, I would like it to replace its file and then reload.

I think it would be better than to have an "updater" exe separated, because what if the updater has to be updated?

It is not possible for me to have shared folders in the network.

like image 510
Ricardo Acras Avatar asked Jan 20 '09 00:01

Ricardo Acras


1 Answers

https://stackoverflow.com/questions/264788/can-i-update-a-exe-that-is-running-closed

Yes, you can have the exefile downloading itself. Just rename the running exe to .bak, download the new exe as .exe, then restart application.

The key here is that you cant download the new version over the old version when the program is running, and the solution is that you CAN rename the running exe and THEN download the new with the same name as the running exe had before the renaming occured. Then its just a verification of the downloaded exe:s size and a restart of the program and you are up and running!

like image 62
Stefan Avatar answered Sep 29 '22 07:09

Stefan