Technically Blogging

Friday, March 24, 2006

Deployment with Generic Bootstrapper

With .net Framework 2.0, Microsoft has provided a generic bootstrapper (Setup.bin), which can be used to deploy complex application having lots of dependencies.

Pull based deployment technology, ClickOnce also uses the same bootstrapper component for application deployment.

The concept of bootstrapper is based around packages. So you have any application which you needs to deploy. It could be .msi of a custom executable. That application depends on certain prerequisites to be installed on target machine. Windows Installer could be one of them, if your application is packages as msi.

So the deal is that you encapsulate all the prerequisite in their respective packages using a published xml schema. Every package is written using 2 xml files. (Package.xml and Product.xml). So specify required installation instractions for every package in these 2 files.

Once you are finished with packages. You feed all those package files along to an MSBuild task-- which will take the bare setup.bin, process instructions from all the files and put certain markers into the setup.bin file and in end emits a setup.exe -- which is final bootstrapper.

Now you distribute this bootstrapper alone -- When this bootstrapper will be executed on target machine. First thing it will do is to see what prerequieste needs to be installed. If it finds that certain prerequisites needs to be installed. It fectches them from some location (could be Web or UNC) and install them. It only install those prerequiste which are not present on the target machine.
Once all the prerequiste got installed, it launches thet setup of your application.

So bootstrapper makes the deployment fairly easy task.

By the way, if you use ClickOnce and ClickOnce Publish page-- Most of this stuff is done for you. You don't need to know all this detail. But it's handy if you need to write your own packages and have to build custom bootstrapper.

0 Comments:

Post a Comment

<< Home