Start C self updating application

C self updating application

After downloading the newer assembly, the older assembly is replaced and the launcher app loads the assembly present in the current directory (which is now the new one). Because in order to check the version number, the assembly must be loaded.

If the versions don't match, then that means the binaries are out of date and a newer version ought to be downloaded.

Batch-scripts offer a number of extensions that can be used with any of the numbered parameters from above.

This article has a nice overview of all of the possible extensions.

I've always thought it was the height of classiness when an application lets me know that there's a new version available.

Even little applications with no installer like Lutz's Reflector update themselves automatically.

For Windows systems it uses the trick with the Batch-file from above.

The result is a simple platform independent self-update function.

In Windows you cannot write to an executable file while it is still running, because the file is locked by the file system. First the Batch-file deletes itself, then it starts the updated application.