Setting up bootstrapper package of Microsoft Office Primary Interop Assemblies (PIA) to use as prerequisite for setup project

This is the procedure to set Office Primary Interop Assemblies as prerequisites to your setup project.
First, You need to download the sample of component checker sample (ComponentChecker.cpp) from this MSDN page. http://msdn.microsoft.com/en-us/library/bb332051(office.12).aspx
Please go through “Preparing the Office Component Check” section in this article. Then follow these steps.

  1. Open the Command Prompt window needed to compile the check.If you are using Visual Studio 2008, open the Visual Studio 2008 Command Prompt by clicking Start, and then pointing to Programs, pointing to Microsoft Visual Studio 2008, pointing to Visual Studio Tools, and then clicking Visual Studio 2008 Command Prompt.
  2. At the command prompt, change the directory to {SamplesDir}projectsChecks
    By default, the SamplesDir directory is C:Program FilesMicrosoft Visual Studio 2005 Tools for Office SE ResourcesVSTO2005SE Windows Installer Sample Version 3.
  3. Compile the component checker by typing the following command
    cl.exe /Oxs /MT /GS ComponentCheck.cpp advapi32.lib
  4. Close the Command Prompt window.
  5. Using Windows Explorer, copy the executable file ComponentCheck.exe into {SamplesDir}packagesOffice2003PIA and {SamplesDir}packagesOffice2007PIA.

To prepare the primary interop assemblies bootstrapper package, follow these steps.

  1. Download Office 2003 Update: Redistributable Primary Interop Assemblies from the Microsoft Download Center.
  2. Run the primary interop assembly installer.
  3. Accept the Microsoft Software License Terms, which gives you the right to package the primary interop assemblies as part of your installer.
  4. In Windows Explorer, open the folder to which the installer extracted the files.
  5. Copy O2003PIA.msi into the directory {SamplesDir}packagesOffice2003PIA

For more details, go through these:
http://msdn.microsoft.com/en-us/library/bb332051(office.12).aspx
http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/cd733f1a-7db3-430d-9700-92dc7bdac077/?prof=required
Hope this helps!

2 Comments

Leave a Comment

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