Program Live Update for a Windows Desktop Application
Update program and data on remote customer PCs.
One of the great advantages of a web application is that updates only have to be performed on the centrally used server. These can be new program versions, a bug fix or even new data. Unfortunately, the programmer of a desktop application does not have this luxury. He must deliver a mechanism for updating already at the first release of the program.
Live update for individually programmed software
Program Live Update: The life cycle of a desktop application begins with the distribution of the installation program (also called setup). The recipient of the program runs the installer and henceforth the program is on their PC. This can be around the corner in Oberbierenbach or also in China or the USA. Since it is not possible to go there for error analysis and for many customers no remote maintenance is possible for reasons of confidentiality, the program needs an update mechanism that is as stable as possible. Since this must be carried out with the program already installed, i.e. in real time, so to speak, it is referred to as a live update.
It is recommended to let such a live update be carried out by a so-called loader. This is a small program that performs the following tasks:
How does the update get to the loader?
Downloading program and data updates is the task of the actual application (App.exe). When the program starts, a low priority thread is started. This downloads available updates, takes care of error handling and program version handling. Thus, the time-consuming downloading can be done in the background while the user is working with the program. The result of the download is the executable program file (called Update.exe in the example) and this can be processed the next time the loader is started. This procedure has another advantage: if the download should fail, the update file can be sent by mail or other means. The recipient only has to copy this into the folder intended for the update mechanism and the update can be carried out as usual.
Tip: If necessary, the actual application (App.exe) can be extended to download separate update files for the database and for the loader. If the app updates the executables of the loader, this can also be kept up to date by updates.