Bootstrapper Manifest Generator (2008) – How To Guide v2

I wrote the original Boostrapper Manifest Generator (BMG) blog post a few years ago.

It is one of the most heavily visited pages on my site so I thought I should revisit it, and given that the BMG is so buggy it could be useful to have some screen shots.

I will provide 2 concrete examples of how to use the BMG to create a bootstrapper pre-requisite check.

All this is being done on a Windows 7 32-bit (Virtual) machine, with visual studio 2010 installed.

I have also downloaded and installed the BMG2008 which can be downloaded from here

The application that I am going to bootstrapper is a small test application called “GuidGenerator”, can you guess what it does?

I will be using a standard setup deployment project to create the installer.

Here goes..

Setup BMG 2008

  1. Download the BMG2008 from here
  2. Install the application and note the path that it is installed to as it does not create a short cut, (C:Program FilesMicrosoftBootstrapper Manifest Generator for VS2008), and create your own desktop shortcut
  3. Run the BMG
  4. Click “Tools :: Edit Machine Paths”
  5. You may get a message about the SDK not being installed etc etc. Get past the error message and you will need to set the path to your boot strap directory. Do a search on your file system for “bootstrapper” and you will find a folder somewhere like this (note the SDK path)
    C:Program FilesMicrosoft SDKsWindowsv7.0ABootstrapper
    Enter that into the path and choose OK.

    You are now ready to create a bootstrapper

    Note: This bootstrapper folder is important – read the tips and tricks at the end.

Example 1 – .Net Framework 4.0 Pre-requisite Check

  1. Download the DotNet framework full install from Microsoft here, and save to a location that you can find, mine is @ c:DownloadsdotNetFx40_Full_x86_x64.exe
  2. Run the BMG
  3. Click “File New”
  4. Choose “Package Manifest”, choose OK
  5. Choose “Add Install File”, (button in the top left)

  6. Browse to the .Net Framework that you downloaded earlier and click OK
  7. Display Name: enter a name for the bootstrapper, this is the name of the pre-requisite check that will show up in visual studio. I will call mine “My .net Framework 4.0 Check”
  8. Click back on the “Package” option which is the root of the tree menu on the left and set the Product Name to DotNet4Check – this becomes the name of the folder that the package is created in.
    Note: You have to do it in this order as if you set the package name before adding a file it crashes the BMG.
  9. Click into the product code field and it will default with the “Product Name” just set, (otherwise this can throw a warning if left blank).
  10. System Checks
      You want to set up a system check that fails if the condition is not met, or alternatively by-pass the install if a condition is met.
      If it fails the check then it will prompt the user that they need to install the pre-requisite.

      For the .Net Framework I have chosen to do a simple registry check for the .Net Framework version.

    • Switch to the system checks tab
    • Click on the registry check (2nd icon in the list)
    • Property for Result: DotNet4RegCheck (note: this is the name of the check that is used later in the “Install Conditions” tab
    • Enter the following registry key: HKLMSoftwareMicrosoftNET Framework SetupNDPv4Full
    • Registry Value: Version
  11. Install Conditions
    • Switch to the install conditions tab. This is where we define when our installer should be run.
    • Type: ByPassIf
    • Property: DotNet4RegCheck – (This is the name entered in the “Property for Result” field in the system check
    • Comparison: Ver >=
    • Value: 4.0.30319
  12. Exit Codes
    Set the following: (Note: I am cheating as I am reverse engineering the .Net bootstrapper that comes with VS2010 to get these exit codes

      0 – Success
      3010 – Success with reboot

    Leave all the other options with their defaults

  13. Build: Now we can build the package, (button top right)
  14. Results, note that in my case it succeeded with no errors, and the path contains the folder name that I entered in the product name field.

  15. Copy: Go to the output directory and copy the “DotNet4Check” folder to “C:Program FilesMicrosoft SDKsWindowsv7.0ABootstrapperPackages”
  16. Setup Project
    1. My project looks like this:

    2. Right Click on the Setup Project and choose properites
    3. On the properties window Click the “Pre-Requisites” button.
    4. Deselect anything that is selected that you do not require and choose your check.

    5. In this case I am going to say – “Download prerequisites from the same location as my application”
    6. Build the setup solution in release mode.
    7. Copy the release directory somewhere to a machine missing the pre-requisites. The release directory should look something like this, because we chose to set the download from the same location.

    8. Run the installer and you will see this…

Example 2 – .Net Framework 4.0 Pre-requisite Check – web download

In this example we want to supply a web download version of the installer so you don’t have to distribute the requisite files with your installer.

This will be identical to the previous example with these changes:

  1. After adding the file you get the Properties tab. Enter the URL from the tips below in the “HomeSite URL” setting.
    I used – for the .Net 4.0 Framework. (remember you must right-click and choose paste).

  2. When setting up the package pre-requisites choose to “Download Pre-requisites from the package vendors website”.

Repeat all the other steps and when you choose “install” from the bootstrapper prompt you should get a message that it is downloading.

Tips and Tricks

  • The “Bootstrapper” directory is your friend (on my machine “C:Program FilesMicrosoft SDKsWindowsv7.0ABootstrapper”).
    If you have access to a VS2010 installed machine and go to the bootstrapper directory and into the Packages folder and you will find bootstrappers for 19 different things, including .Net 3.5/4.0 and Client installation versions.
    I suspect if you took a copy of the packages folder back to your older VS2005/2008 environment you would get the pre-requisites.
  • If you don’t intend to set up exit conditions don’t switch to the “Exit Conditions tab”. if you do it will put an empty condition in that throws a warning at build time. The only way to get rid of it is to enter 0 / Success.
  • I suspect for things like .Net you want the user to be able to download the .exe directly. Here are the URL’s provided by the .Net bootstrappers installed with VS2010.

    These are the small web installer based versions

    • .Net Framework 3.5 SP1: download
    • .Net Framework 3.5 Client: download
    • .Net Framework 4.0: download
    • .Net Framework 4.0 Client: download
  • My web install failed because on my Install I happened to click into the “Value” field and it put the following “N/A for ValueExists and ValueNotExists”. This created an “unexpected error” on install.
    I went into the product.xml file and set value=”” and it worked.

15 thoughts on “Bootstrapper Manifest Generator (2008) – How To Guide v2

  1. The problem I’m having is that I’m trying to run on 64-bit machine and it crashes on the Tools::Edit Machine paths (first step).

  2. I have tried specifying every possible argument to make the .Net 4.0 (x86 and x64) install silently including: /q, /qn, /q /passive, /q:n /passive

    All of these show the dialog similar to the one you showed above. Is there any at all to a complete UI-less install of .Net 4.0?? I want the user to install my application without know at all that .net 4.0 was being installed.

  3. I am trying to achieve this goal using your previous site and this site guidance. I created manifest’s using BMG and also manually. With any I can select it from VS. I build the setu project in Relese but when I execute my installer, it just doesn’t install the prerequite I added. I am using Win 7 32 bit VS 2008. I am trying to install opevpn as a prerequisite. But somehow it doesn’t install only. Directly my application install only comes up. Also tried your way with RegistryCheck.It just fails.I have also asked for help at :
    where you will find my xml file’s code.

    Am stuck on this since last 2 days. Would be good if anyone can help me.


  4. I’m having problems with this walkthrough. I am trying to install VC++ redist 2008 if it is not already installed, skip otherwise. According to regedit, VC++ 2008 redist has a key of {9BE518E6-ECC6-35A9-88E4-87755C07200F}. I add this to System checks : RegistryFileCheck in HKLMsoftwaremicrosoftwindowscurrentversionuninstall key and grab the DisplayVersion value which is 9.0.30729.6161 and i put it to a variable “installed.” Inside install conditions i check property “installed” “>=” value of “9.0.30729.6161.” i build and add it to 6.0A packages for 2008 and add it correctly to my install project, but when ran in a VM, this check never takes place and the installer runs even though this exact version is installed on that machine. the installer pops up asking to repair or remove it when i run my installer.

  5. @Terry

    Hi Terry, did you solve your prequisite install problem? If so, what was your solution as I am having the same problem. Everything builds ok, but the prerequisite doesn’t run/install.


  6. @talljames
    This is a very hit and miss affair. I found the best check type was a file type check and that the BMG doesn’t respond well to saving and re-opening your package. So trial and error is required to get it to run successfully.
    Not trying to be simplistic I assume you are running the “Setup.exe” not the “.msi” file. The pre-requisite checks are only executed from the “Setup.exe” running the”msi” bypasses the checks. (I know this is pretty poor but this is how it works..)

  7. @Terry

    Hi Terry, did you solve your prerequisites install problem? If so, what was your solution as I am having the same problem. Everything builds ok, but the prerequisite doesn’t run/install.
    i am running the setup.exe but still its not installing the prerequisites application
    please Reply….

  8. I am trying to chain install an msi as pre-requisite for my vb application. In particular i am try to install the ms speech platform server runtime. I would prefer to avoid dealing with registry keys so i am trying to set up the install using a system on the application. I set up my package just like your example, excepting that i use the app check rather than reg check, and i set it to download from the same place as my app when i add the pre-req to my setup project, but when i install it just ignores the pre-req even though it is not yet installed. I am confused – what am i doing wrong?

    thanks in advance

  9. @Me
    You have to run BMG as administrator to be able to do ‘Edit Machine Paths’. Otherwise it crashes. You can find out if the path is correct if you click on the ‘Edit Machine Paths’ Menu. It will show an error message if it is not set correctly.

  10. Unable to find the tool, keep getting routed to a page saying its archived by no info as to where. Can anyone direct me to where I can obtain BMG_2008.exe?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.