I have a Windows program that should automatically update from the server.
It can already transfer files from the server and update + check files such as DLL plugin files before downloading them.
However, this program also needs to update itself. There are probably several ways to do this, and the most obvious of all online clients is to create an "automatic patcher" that downloads and then runs the client executable. This introduces the problem of the need to update startup, so if there is a more elegant solution, I would like to hear about it.
I have to imagine that there is a way to download the new executable file as a temporary file, say, “client.exe.tmp”, and then start a separate process, waiting for the original client.exe to finish working and then rename / copy the new file on top of it.
Has anyone done this before, and what method did you use to make it work?
source share