2007-05-10
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 2 of 2 )
ClickOnce Deployment
One of the features of ClickOnce deployment is the ability to have the application check for updates automatically. TO specify the details for updates:
- Select your project in Solution Explorer.
- Select ProjectName Properties from the Project menu.
- Click the Publish tab.
- Click the Updates button and select options as follows:
- The Application Will Check for Updates: This option must be on if you want the application to check for updates.
- After the Application Starts: The application checks for updates after it has started and installs updates the next time the application is run. Results in faster program startup but may result in the user running an out-of-date version.
- Before the Application Starts. The application will check for and install updates each time it runs. This results in slower program start-up but endures that users are always running the latest version of the application.
- Specify How Frequently...: If you selected the After the Application Starts option (above), specify how frequently it will check for updates.
- Specify a Minimum Required Version...: Updates will be installed only if the current installed version is lower that what you specify here.
To deploy a project using ClickOnce, open the Build menu in Visual Studio and select Publish ProjectName from the menu. The Publish Wizard will take you through a few steps where you specify the following information:
- The publish location, a local path, file share, FTP server, or web site where the published files will be placed.
- CThe location from where users will install the application. This can be a web site or a UNC path/file share. You can also specify a CD-ROM, but using this kind of install location defeats some of the advantages of ClickOnce deployment. You will copy the install files from the location specified in the first step to this location to make the application available to users.
- Whether the application will be available both online and offline or online only:
- Online and offline: The application will be downloaded to the local system so it can be used when an Internet connection is not available. A shortcut will be added to the Start menu and the application can be uninstalled from Add/Remove Programs.
- Online only: The application will be run directly from the publish location.
- Where the application will be updated from. This page applies only to applications deployed from a disk path. If the deployment location is a Web site or file share, the application will check for updates from the location you specified in the Application Updates Dialog Box.
Choosing a Deployment Strategy
In determining whether ClickOnce deployment is the correct choice, three advantages that ClickOnce has over Windows Installer stand out as being most important.
The first factor is ease of updates. A ClickOnce application can be configured to update automatically over the network, from a share or a Web site, without requiring any interaction from the user (beyond perhaps confirming the update). In contrast, Windows Installer installations do not provide for automatic updates. This can be a major benefit for applications that are updated frequently.
The second factor relates to potentially harmful interactions on the user's computer. Windows Installer deployments often rely on shared components, and this brings with it the possibility of versioning conflicts (a less serious but still annoying variant of the DLL hell of the past). A ClickOnce deployment is completely self-contained so it cannot interact or interfere with other applications.
The third factor has to do with security permissions. Windows Installer deployments typically must be run with Administrative rights, which most users won't have. On the other hand, ClickOnce deployments can be run by non-administrative users.
These are all potentially important considerations but, as with most of life, there's a trade-off. ClickOnce deployment lacks the power and flexibility of the traditional Windows Installer deployment. Among the limitations of ClickOnce deployment are the following:
- Cannot install drivers.
- Cannot install for multiple users, only for the user who installs the application.
- Cannot add the application to the Startup group or to the Favorites menu.
- Cannot register file types.
- Cannot patch binary files.
- Provides only limited access to the Registry.
It seems that making your choice should be fairly easy. The two available deployment methods are very different in their capabilities and limitations, and now that you know these differences you should able to readily make a decision based upon the details of your application.
![]() |
|


