Search code examples
.netgoogle-chromeauto-update

Can a .NET application update itself in the background like Google Chrome?


Google Chrome updates itself in the background. No user action is required. I find this to be a very good and user-friendly way of updating an application. Does anyone know exactly how this is done technically, and if you could do the same thing for a .NET (WPF) application?


Solution

  • ClickOnce is a terrible solution, because it doesn't do it in the background, it only checks upon launch, and can significantly slow down launch time.

    Chrome on the other hand checks periodically while the application is running, downloads the update silently, then installs it when you say "OK, why not".

    There is very little delay from the user's perspective, and stuff just keeps on chugging.

    Shadow Copy will be your best bet. You'll want to write a timed event that periodically checks a web server for updated components, and downloads them as required. The Shadow Copy is the way to replace them.

    Designing your system for modularity will also help - rather than having to download every single file involved in the execution of your application, you could design it so that core areas can be updated independently, reducing the payload for the end user each time they download your updates.

    For a more extreme solution, various vendors provide update services, such as InstallShield.