How to: Apply Updates at a Future Time

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
To create client business applications using current Microsoft technologies, see patterns & practices' Prism.

ClickOnce applies a pending update the next time an application is launched, but only after the update is completely downloaded. If you use ClickOnce automatic updates, the download can be triggered automatically when the user launches the application, or you can use the on-demand API to start the update programmatically. However, it can be difficult to determine when an update is actually available and applied on a client computer because the download process is affected by when the application runs, how big the update is, how busy the server is, and the amount of bandwidth that is available. Therefore, there may be times when you want to stage an update on the client computer ahead of time. You can then use ClickOnce to apply the update later, when all users have had a chance to download it.

For example, you might have a large update that you need to roll out to users, but you need to make sure that all users start using the new version of the application at the same time. However, you do not want users to have an extended wait because everyone is trying to download the update at the same time (assuming the update policy for ClickOnce has been set to check for updates before running the application).

If the updates that you are applying are new Composite UI Application Block modules, you can address this scenario by using a combination of ClickOnce updating and the Profile Catalog Service Web service to determine when the deployed updates are actually put into use.

In this scenario, you would publish an update to the deployment server when the updated files became available. You would then wait a sufficient amount of time to make sure that all or most users have had a chance to download the application. For example, if the users typically start the application at the start of the workday and leave it running all day, you would have to wait at least one day for the update to be downloaded and applied through ClickOnce. You would then add the new modules to the list of modules in the profile catalog the night before you want to put the new modules in operation. When the users start the application the next day, the application files will already have been downloaded to their computers through ClickOnce, and will be loaded without delay after the call to the Profile Catalog Service Web service has been made to determine which modules to load.

To use this scenario, you must complete the following procedures:

  1. Publish the updated version that contains the new modules.
  2. Use ClickOnce to allow client computers to download the updates, and automatically apply them the next time the application starts. (This is the staging step.)
  3. After sufficient time has elapsed for all users to have received and applied the updates, add the new modules to the profile catalog so that all users can start using the updated version at the same time.

For detailed information about how to use this approach, see Applying Updates at a Future Time.