shared add-in deployment/BootStrapper product.xml questions?

B

BatKing

Hi everyone,

I am working on a shared add-in for outlook 2003 and 2007. the problem I am
facing now is making office 2007/2003 PIA pre-requisites.

because my add-in works for both outlook 2003 and outlook 2007, I want my
setup.exe works for both version. However, the PIA keep installing on the
wrong version of office. for example, 2003 PIA is trying to install on office
2007 machine and 2007 PIA is trying to install on a office 2003 machine.

so what is the correct way to code the production.xml for PIA in the
bootstrapper packages?

I kind get PIA 2003 works however I think it is not the correct way. I code
the product.xml as following. basically I have two <ExternalCheck>, one for
2003 PIA component IDs, and one for 2007 PIA component IDs. and <BypassIf>
for both <ExternalCheck> properties. The only reason I think this is
currently working is all the machines I test with office 2007 have 2007 PIA
installed as this is included in the default office 2007 installation. so
<BypassIf> works and the 2003 PIA won't install on office 2007.

for PIA 2007, I have the same problem but fails on every office 2003
machines. this is because PIA doesn't exist on office 2003 machine as it is
not in standard installations of office 2003 and PIA 2007 keeps installing on
office 2003 and fails. I was thinking to use the component IDs of office and
Component IDs of Office PIA together can solve this problem. basically same
as above with 2 <ExternalCheck> but one for PIA and one for the Other version
of office (ie, for PIA 2003, I check the component IDs of PIA 2003 and Office
2007 to ByPass the installation of PIA 2003). However, I can't find the
component IDs for office 2003/2007 on the web.

anyone know what is the correct way to do this or what is the component IDs
for office 2003 and 2007?
 
K

Ken Slovak - [MVP - Outlook]

See
http://msdn.microsoft.com/en-us/lib...installeroverview_productcodesandcomponentids
for a list of all the componentID's you need.

I use registry checks for which version of Office is installed (if any). My
product.xml files look like this.

Outlook 2007:

<?xml version="1.0" encoding="utf-8" ?>

<Product
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
ProductCode="Microsoft.Office.PIA.2007"
<RelatedProducts>
<DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
</RelatedProducts>

<!-- Defines the list of files to be copied on build. -->
<PackageFiles>
<PackageFile Name="o2007pia.msi"/>
</PackageFiles>

<InstallChecks>
<RegistryCheck Property="Office2003Installed"
Key="HKCR\CLSID\{0006F03A-0000-0000-C000-000000000046}\ProgID" />
<AssemblyCheck
Property="Interop.Outlook2007.Installed"
Name="Microsoft.Office.Interop.Outlook"
PublicKeyToken="71e9bce111e9429c"
Version="12.0.0.0"/>
</InstallChecks>

<!-- Defines how to run the Setup package. -->
<Commands Reboot="Defer">

<Command PackageFile="o2007pia.msi"
Arguments=""
EstimatedInstalledBytes="30000000"
EstimatedInstallSeconds="60"
<InstallConditions>
<BypassIf Property="Office2003Installed" Compare="ValueEqualTo"
Value="Outlook.Application.11" />
<BypassIf Property="Interop.Outlook2007.Installed"
Compare="ValueExists" />

<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false"
String="AdminRequired"/>
</InstallConditions>

<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true"
String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
</Product>

For Outlook 2003 I use this:

<?xml version="1.0" encoding="utf-8" ?>

<Product
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
ProductCode="Microsoft.Office.PIA.11.0"
<RelatedProducts>
<DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
</RelatedProducts>

<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="O2003PIA.msi" HomeSite="O2003PIAMsi" />
<PackageFile Name="eula.txt"/>
</PackageFiles>

<InstallChecks>
<RegistryCheck Property="Office2007Installed"
Key="HKCR\CLSID\{0006F03A-0000-0000-C000-000000000046}\ProgID" />
<AssemblyCheck
Property="Interop.Outlook2003.Installed"
Name="Microsoft.Office.Interop.Outlook"
PublicKeyToken="71e9bce111e9429c"
Version="11.0.0.0"/>
</InstallChecks>

<Commands Reboot="Defer">
<Command PackageFile="O2003PIA.msi"
Arguments=""
EstimatedInstalledBytes="5109000"
EstimatedInstallSeconds="80">
<!-- These checks determine whether the package is to be installed -->
<InstallConditions>
<BypassIf Property="Office2007Installed" Compare="ValueEqualTo"
Value="Outlook.Application.12" />
<BypassIf Property="Interop.Outlook2003.Installed" Compare="ValueExists" />

<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false"
String="AdminRequired"/>

</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true"
String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
</Product>

Don't forget that if the Outlook 2003 PIA's need installing you also will
probably need to install extensibilty, that's part of the 2007 PIA package
but not part of the 2003 PIA package.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top