views:

402

answers:

6

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.

A: 

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

MasterMax1313
A: 

This solution talks about checking the registry for some keys. Have you tried it?

Shoban
+3  A: 

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).

This seems to work well for versions 2000, XP, 2003 and 2007 at least.

Ant
A: 

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

Bernd Ott
I did consider this, but, not having the Office MSI files to hand didn't have the Excel Component codes. Do you have them?
Samuel Jack
sorry i dont have office - we are using OO. But you can query them by using the installer api. you have to use the api anyway to increment the usage count of the excel components. if you dont do this, excel (features/components) can deinstalled and your app doesnt work anymore.
Bernd Ott
+3  A: 

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.

Samuel Jack

related questions