So I’ve been thinking about coding an auto-updater for an audio plugin … here is how I imagine it would work:
1 - on startup, plugin checks for internet access, and points to some remote XML which has a version number.
2 - if the version number in the XML is greater than it’s own version number, it downloads the new plugin DLL and stashes it somewhere.
3 - the program then launches a process that will attempt to copy the stashed DLL and overwrite the current DLL (intuiting the plugins location, since it can vary)
4 - the DLL closes so that the new process can copy (naturally you can’t overwrite a program as it is running)
I imagine the “process” will have to be a separate executable file, probably sitting in the AppData directory.
Sound reasonable? Any gotchas to keep in mind ?