Question

I'm using Wix v3.0 (which boils down to an MSI installer) and I'm trying to author a condition to ensure that Excel 2003 is installed. What is the best (most robust) way to detect the presence of Excel 2003 on a machine?

I've seen lots of different suggestions, but no definitive or authoritative answer.

Was it helpful?

Solution

I found a file in the Office 2003 toolkit, Office 2003 Keypath and Default Installation Settings workbooks that contains all the GUIDs for the Components of Office. Based on this, I used a Component Search to locate the Core Excel component. In WiX my condition looks like this:

    <Property Id="EXCEL2003INSTALLED">
      <!-- This is the Component Id of Global_Excel_Core -->
      <ComponentSearch Id="DetectExcel2003" Guid="{A2B280D4-20FB-4720-99F7-40C09FBCE10A}" Type="file"/>
    </Property>
    <Condition Message="This application requires Excel 2003 to be installed."><![CDATA[Installed OR EXCEL2003INSTALLED]]></Condition>

This page has Component Guids for other Office Apps and other versions.

OTHER TIPS

We check the InstallRoot registry key at:

HKLM\Software\Microsoft\Office\12.0\Excel\InstallRoot

(Replace 12.0 with the relevant version number for your application).

Note that on 64-bit operating systems, this will be reflected to the 32-bit section of the registry (see this Microsoft article for more information on Registry Reflection).

This seems to work well for versions 2000, XP, 2003, 2007 and 2010 at least. The only change for 2010, is that the 64-bit version needs you to look in the 64-bit section of the registry.

you could try checking the registry, or perhaps the typical install path for excel.

Excel (Office) is also installed by windows installer. Why are you not checking for the excel component codes?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top