Best method for implementing Self-Updating Software

Another option: when the main application wants to update itself, it spawns a new updater process and then closes itself. The spawned process in the meantime waits for the main application to close (the process to disappear) and then updates all of the necessary files (including the .exe). After that it simply restarts the main application and exits the updater process.


Im using the second method without any problems. Just make sure the downloaded assembly was correctly downloaded. ;)

Run Update.exe and let it do this:

  1. download the new update.exe as update.ex_
  2. rename the update.exe to update.bak (you can rename it, but not overwrite it)
  3. rename the update.ex_ to update.exe
  4. restart update.exe

Im doing this with no problems at all so its tested and are running in live environment in about 400 customers as we speak.