ClickOnce supports both automatic updates and programmatic updates. The automatic updates are done by the ClickOnce runtime on the client computer before or after the application starts, and a number of options are supported. Programmatic updates are done through the ApplicationDeployment class in the System.Deployment.Application namespace. For more information, see How to: Add On-Demand Programmatic Update.
The options for automatic updates include the following:
- Checking for updates before the application starts, after the application starts, or both
- Making an update optional or required
- Checking for updates on a scheduled basis
- Checking for updates in a location different from the original installation
ClickOnce automatic updating downloads an update as soon as it is available on the server and applies the update the next time the application runs. As a result, if you want to delay the application of an update after it is on an update server, you will have do one of two things:
- Use the ClickOnce programmatic API to detect when the update is available, and delay programmatically downloading the update until your delay criteria is met (possibly by checking a remote service that tells the application when to update).
- Use a dynamic loading mechanism, such as the Composite UI Application Block profile catalog, to determine when to load and start using a file. ClickOnce can immediately download updates when they are available, but the profile catalog determines when those updates are applied. For more information, see How to: Apply Updates at a Future Time.