How to: Download ClickOnce Application Updates
This example uses the My.Application.Deployment object to download and install the latest version of an application. The example does not update the application unless it is out of date and was deployed as a ClickOnce application.
This example downloads and installs the update after using the My.Application.IsNetworkDeployed Property to make sure that the application is deployed using ClickOnce. The Update method does not update the application unless it is out of date. The application has to restart to use the update.
This code example is also available as an IntelliSense code snippet. In the code snippet picker, it is located in Application—Compiling, Resources, and Settings. For more information, see How to: Insert Snippets Into Your Code (Visual Basic).
Only applications that are deployed using ClickOnce can be updated using the My.Application.Deployment object. For more information on deploying a ClickOnce application, see How to: Publish a ClickOnce Application.