PIAs not being installed by prerequisite installer
We have created a document-level solution using vsto 3.0, and as part of the prerequisites installer (the setup.exe that is created once the vsto project is published) i have selected the following:
Windows Installer 3.1
.Net Framework 3.5
Microsoft office 2007 Primary Interop Assemblies
VSTO 3.0 runtime SP1
"Download prerequisites from the same location as my application" is selected as the install location.
So now when the setup.exe is run on the clients machine we find that everything gets installed except for the PIAs, the installer doesn’t even try to install them, we get no error message. When we run the "o2007pia.msi" which is packaged up with the setup.exe, on its own the PIAs are installed fine.
Does anyone know why the setup program is unable to run the o2007pia.msi?
All Replies
- C,
if you look in the PIA directory, you'll find a ComponentCheck.exe. this binary is run first to check if the correct version of Microsoft Office is installed, and it also checks if the PIAs are already installed.
the PIAs are automatically installed during the Microsoft Office installed if there is a version of the .NET Framework already installed. Windows Vista ships with a version of the .NET Framework. if Microsoft Office was installed on Vista, the PIAs are already installed.
m. - m,
Thanks for your reply, we don't actually have ComponentCheck.exe in the PIA directory should VS put it in there by default when we create the setup program? or do we need to copy it from "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\Office2007PIARedist" and put it in ourselves, which would seem kinda strange, but we tried it anyway :-) and still the PIAs failed to run as i guess the setup.exe is not being told it needs to run it when it is being created. Any idea why VS is not putting the ComponentCheck.exe in the PIA directory?
Thanks. - Looking into the product.xml file i can see that ComponentCheck.exe should be getting copied into the Office2007PIARedist folder along side the PIA msi, but it is not.
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.Office.PIARedist.2007"> <RelatedProducts> <DependsOnProduct Code="Microsoft.Net.Client.3.5" /> </RelatedProducts> <!-- Defines the list of files to be copied on build. --> <PackageFiles> <PackageFile Name="o2007pia.msi" /> <PackageFile Name="ComponentCheck.exe" /> </PackageFiles> <InstallChecks> <ExternalCheck Property="PIAInstallAction" PackageFile="ComponentCheck.exe" /> </InstallChecks>
As a test i added an extra node for another .exe i had on my machine into the <PackageFile> block, and now when i built the project that particular .exe was included in the Office2007PIARedist install folder, so it seems theres something about the ComponentCheck.exe that the build process is not liking, any help will be much appreciated
- After some digging it seems that the componentcheck.exe is getting embedded with the setup file and therefore it is not copied into the PIA folder, this only gets done with files that are referred to in the <ExternalCheck> tag.
But i'm still having problems with what componentcheck.exe seems to be returning to the PIAInstallAction property as i am getting inconsistent behavior with every build
i.e.
When i run the setup.exe the PIA installer is always getting executed regardless of that fact that they are already installed, or the PIA installer is never getting run at all even if PIA are not installed.
Thanks. - Hi there,
ComponentCheck.exe is indeed embedded directly into setup.exe when you publish a solution. When setup.exe is run on the target machine, ComponentCheck.exe is unpacked to a temporary directory and run from there.
As a test, however, you can just copy ComponentCheck.exe (from %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\Office2007PIARedist) to an arbitrary location on a test machine and run it from a batch file as follows:
ComponentCheck.exe
echo %ERRORLEVEL%
This script should echo "1" to the console if the PIAs are already installed or "0" otherwise. The PIAInstallAction property is set to this return value and used to block or enable installation of the PIAs respectively (<BypassIf Property="PIAInstallAction" Compare="ValueNotEqualTo" Value="0" />). Please let us know if ComponentCheck.exe gives the expected return value on a machine with Office 2007 PIAs installed and another machine without the Office 2007 PIAs installed.
Thanks, Richard.
[Text reproduced at http://blogs.msdn.com/rcook/archive/2009/03/12/issues-with-office-2007-pia-redist-and-componentcheck-exe.aspx] - Hello Richard,
Thank you for your reply, i have done what you recommended but on three machines, one that has office 2007 installed (without PIAs), one that has no Office installation and one that has office installed with PIAs, on all three machines i get "echo 1 1" returned.
I have run VSTO power tools 1.0 on the machines that do not have PIAs installed and the troubleshooter exe does confirm that they mostdefinitely are not present on the machines, i have also checked within Windows Install Clean Up and PIAs are not present in the list of products to remove, and this is the tool that i have used to remove them when i have manually installled them on the machines.
Any ideas what could be going on?
Thanks - Hi there,
i ran into the same problem a few days ago. ComponentCheck.exe always returned 1 even on a plain W2K3 server.
Than i tried to follow the instructions of the HOWTO: VSTOSolutions in this MSDN article:
http://msdn.microsoft.com/en-us/library/cc563937.aspx#VSTO3SolutionPart1_PreparingyourDevelopmentComputer
They suggest to download the VSTO3 Samples (http://code.msdn.microsoft.com/VSTO3MSI) and compile the ComponentCheck tool by yourself.
The sources are included in the samples. This version takes one or more ComponentID's as input arguments. So as a result you have to modify
the product.xml file in your Office2007PIA bootstrapper directory to implement the needed argument(s).
<InstallChecks>
<ExternalCheck
Property="PIAInstallAction"
PackageFile="ComponentCheck.exe"
Arguments="{ED569DB3-58C4-4463-971F-4AAABB6440BD}" /> <!-- ComponentID of Outlook 2007 PIA -->
</InstallChecks>
The ComponentID's are also included in the HOWTO.
Because this ComponentChecker returns "0" if a component is installed and a value of "1607" (Component not registered) if it is not, you need to modify the BypassIf condition in the <InstallConditions> section of the product.xml or alternative if you are familiar with C programming change the return value of the ComponentCheck.exe befor compiling.
After these steps the PIA installed just fine.
Hope this helps.
Regards,
Oliver.- Edited byKa11e_Wir5ch Tuesday, June 16, 2009 9:00 AM


