I am developing an app-updater function for my app (WPF dotnet-core 8.0), it works well for now, and bellow is the work-flow, I am not sure if it is a good flow:
one new button on current gui, when clicked, it close the app and start an Updater.exe
the Updater.exe overwrites all files of my app (got new files from server), and re-open App.exe
my concern is that, will this "overwrite" fail due to the app.exe did not close in time (currently, it works well)
or any other better update process
Solution
Here is how I would do it:
If you can use MSIX, then use it with the update functionality
If you use another installation (exe/msi), dont replace files and just download a patch and install it
If you have no installer at all, I suggest use registry entries to track the process and the versioning of the application (or specific files). this way if your updater fails, you have an entry for retry or repair