Bootstrapping Custom Application Setup with Microsoft ClickOnce Installer

clickonceMicrosoft ClickOnce is a deployment technology that provides a platform for deploying Windows-based applications with self-updating functionality in an online installer. The ClickOnce deployment strategy addresses the two major requisites for the Windows-based applications,

1. Online installer that can be downloaded and run with minimal user interaction.

2. Auto-updating application.

The support for creating, publishing, and updating ClickOnce applications is provided in Visual Studio for deploying projects developed with Visual Basic and Visual C#.

Primarily, with the Microsoft ClickOnce deployment technology the developers can concentrate more on the business requirements of the application rather than the crosscutting tasks of strategizing deployment and update mechanisms.

The Microsoft ClickOnce deployment technology provides a customizable framework wherein the developer can use an existing non-ClickOnce application setup to deploy the application via an online installer. The online installer is a simple stub-based setup file of minimal size (<500 kb) available for download as a web-based URI. On clicking the “Run” button the installer stub file will be downloaded to the user’s machine. On running this stub installer the actual setup files will be then downloaded in the background and then run without any actual interaction with the user. This mechanism simplifies the installation of Windows-based applications on user machines in a no-touch approach, i.e. without the user interaction in any other way.

Embedding a custom installer with a ClickOnce application installer is called Bootstrapping. The custom setup files are bootstrapped with the ClickOnce installer so that when the ClickOnce installer runs, it also run the bootstrapped files by itself. Any custom setup files of formats MSI or EXE can be bootstrapped with the ClickOnce installer.

Before the custom setup file is embedded it needs to be converted into a bootstrap package wherein a manifest is generated with Meta data of the custom setup file. This manifest file directs the ClickOnce installer to invoke the custom setup files in a particular way for correctly installing the application on the user machine.

The Bootstrap packages are then configured as prerequisites for the ClickOnce installer in a way that on publishing the ClickOnce installer the bootstrap packages configured are also published. A ClickOnce installer can be published in any of the following ways:

  • Publish to the Web
  • Publish to a file sharing network drive
  • Publish to a distributable CD-ROM or DVD-ROM media

You can customize your ClickOnce installer to install third-party components along with your application. You must have the redistributable package (.exe or .msi file) and describe the package with a language-neutral product manifest and a language-specific package manifest. For more information, see Creating Bootstrapper Packages.

Author Bio:

Author Dhrumil Patel
clip_image002 Dhrumil Patel is a Team Leader at Azilen Technologies. He is a passionate Software Analyst and Architect. Dhrumil is a Techy-savvy and his area of expertise includes UI/UX Engineering, Business Intelligence Solutions, Business Strategy Modelling and more. Connect with him on Twitter, LinkedIn and StackOverflow.