Friday, January 13, 2012
Creating Bootstrapper Packages in Visual Studio 2010


I was working on an app that required other packages to be installed on the target system before it could run. I spent some time looking at the many3rd party bootstrap creators out there and decided there must be a better way to do this, natively, as part of the Visual Studio Installer Project. Well, what I found out is that the Setup program (setup.exe) that is created along side the app.msi, is a generic installer (read as bootstrapper) that can be configured to detect and install redistributable components. This could include anything from Windows Installer to the .Net flavor of your choice and custom (.msi) files and executable programs. 

The cool thing was that you could add prerequisites to your package and the Installer project would automatically pick them up... the question was, how do I a prerequisite that did not show up on the list of available packages? Well, I found this article on MSDN that walked me through it... you see, you can add to the prerequisite list via a set of XML manifests that specify the metadata to manage the installation of any component. You can do everything from checking to see if it is already installed to requiring a specific version or set of registry keys... 


All of this is configure through a set of xml files your create and place in the 
[\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\YourPackage] directory. 


You can also determine the bootstrapper folder location from the Path value in the following registry key: [HKLM\Software\Microsoft\GenericBootstrapper\4.0]. 


And on 64 bit systems, use the following registry key: [HKLM\Software\Wow6432Node\Microsoft\GenericBootstrapper\4.0].


The bootstrapper first detects whether any of the prerequisites are already installed. If prerequisites are not installed, first the bootstrapper shows the license agreements. Second, after the end-user accepts the license agreements, the installation begins for the prerequisites. Otherwise, if all the prerequisites are detected, the bootstrapper just starts the application installer.


Here is an excerpt and links to the MSDN article that got me started:

You can use the Bootstrapper Manifest Generator to create the manifests that describe the bootstrapper package. Alternatively, you can generate the manifests by using the XML Editor in Visual Studio. For more information, seeHow to: Create a Package Manifest and How to: Create a Product Manifest. To see an example of creating a bootstrapper package, see Walkthrough: Creating a Custom Bootstrapper to Show a Privacy Prompt.

Friday, January 6, 2012
'Server huggers' impede cloud migrations | ITworld http://ping.fm/aI8cQ
Thursday, January 5, 2012
Cartoonify yourself in Photoshop in about a minute - How-To Geek http://ping.fm/ypLNw
Tuesday, January 3, 2012
Creating a Windows-based application MSI package http://ping.fm/TDc9R(v=vs.80).aspx

Awesome Accessories I Use

News about Shahin

iPad Accessories

Free Web Hosting

Web hosting

Emruz's Fan Box

Emruz on Facebook

Followers

Emruz. Powered by Blogger.