How to Include MS Office 2007 Hotfix  as Prerequisite into a setup project

Miguel OzSenior Software Engineer
In this article, I will show how to use the Bootstrapper Manifest Generator (aka BMG) tool to build a bootstrap for MS Office Hotfix (You can use similar steps for any hotfix).
This tool will help us to build the folder required in the Visual Studio packages folder and it will show in the prerequisite window for the developer to add to its project window.

This list of Prerequisites, generated by Visual Studio, is based on the content of this specific folder:
[Drive:]\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstr apper\Pack ages
Each sub folder in this Packages folder represents a Prerequisite (Redistributable package) and contains the following files:
- Product.xml manifest file
- Package.xml manifest file
- Redistributable files (Optional. If not found, the software will be downloaded over the Internet.)

The Bootstrapper Manifest Generator tool can downloaded from

We will be generating the Prerequisite for MS Office 2007. A recent hotfix ( KB976811 available through KB976477) for Office 2007 allows us to register and load VSTO add-ins under HKLM for Office 2007.

Target audience
Developers using VS 2008 .NET to add hotfixes as prerequisites. In this case, we are adding  MS Office hotfix so that we can later on use this item to build a VSTO solutions for all users.

The following steps are required:
1. Download the hotfix and unzipped to [Drive:]\temp ([Drive:]\temp\office-kb97 6477-fullf ile-x86-gl b.exe)
Note: MS will send the hotfix download link via email. Unzip the downloaded file with the provided password and make sure to test the hotfix before applying in your production environment.

2. Start the BMG tool (BMG.exe)
Note: Default location is "C:\Program Files\Microsoft\Bootstrapp er Manifest Generator for VS2008\BMG.exe"

  BMG new dialog  
Figure 1 BMG main window

3. In the main menu select File then New.

4. In the New Project dialog, select Package Manifest and click OK.

  BMGFigure 2 BMG New Project dialog

5. In the new Project dialog, enter the Project Name as 'Hot fix KB976477 - Office 2007 All users'
6. Click in the textbox for Product Code to automatically enter a value in it ('Hot.fix.KB976477.-.Offic e.2007.All .users')

  displayFigure 3 BMG Install File information

7. In the toolbar click Add Install File icon. In the Add File dialog box perform the following steps:
7.1 Click Browse and select the executable file which will install the Office hotfix ('office-kb976477-fullfile -x86-glb.e xe')
7.2 Click OK.
7.3 In the New Project dialog, notice that the filename and language are setup with the information from the previous steps.
8. In the New Project dialog, go to the field Display Name (the value shown as the Prerequisite name in Visual Studio), enter the value 'Hot fix KB976477 - Office 2007 All users'

9. In the New Project dialog, click the tab page Exit Codes
9.1 Check Use Default System Exit Codes
9.2 In Result combobox, select value 'Success'
9.3 Uncheck Format Message From System

  exit codesFigure 4 BMG Exit code tab

10. In the toolbar click Build icon, the following steps are required:
10.1 Build Results will be opened, wait until the build is finished.
10.2 The last line in the log field should read: 'Build Succeeded. Warnings: 0, Errors: 0'
10.3 Click the hyperlink on top of the window, next to 'Build Output'
10.4 In Windows Explorer, the folder containing the prerequisite package (Product.xml, office-kb976477-fullfile-x 86-glb.exe and en folder) will be opened
10.5 Copy this folder (Hot fix KB976477 - Office 2007 All users support) to the Packages folder
[Drive:]\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstr apper\Pack ages
10.6 The Prerequisite should now be in folder:
[Drive:]\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstr apper\Pack ages\Hot fix KB976477 - Office 2007 All users support

11. In Visual Studio (in my case VS2008 SP1), the Prerequisites window shows the newly added Prerequisite item "Hot fix KB976477 - Office 2007 All users support".

  VS prerequisitesFigure 5 VS Prerequisites window

You can now build your Setup Project that includes this prerequisite. This prerequisite is critical if you are planning to build VSTO solutions for all users. (see reference 2)

(1) Creating Bootstrapper Packages
(2) Deploying your VSTO Add-In to All Users
(3)   Create an Using VSTO Add-In to automate frequent Excel 2007 tasks
Miguel OzSenior Software Engineer

Comments (0)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.