4

I am currently writing a WIX Installer which has a few dependencies on other products being installed. It is in C# and requires the following dependencies

  • Office 2010 (including Excel/Word)
  • .NET Framework 3.5

Now for the .NET Framework i can use WixNetFxExtension in wix to say

<PropertyRef Id="NETFRAMEWORK35_SP_LEVEL"/>

and then reference this property in a Condition.

Is there a similar Extension to do this for different versions of Office or their individual Files like Word etc.

I know i can use Custom Actions to do this, but I want a simple was to do this rather than creating my own Custom Actions?

matino
  • 17,199
  • 8
  • 49
  • 58
  • 3
    Please take a look at this post http://stackoverflow.com/questions/3266675/how-to-detect-installed-version-of-ms-office – Ciprian Nov 29 '11 at 11:24
  • 1
    I was really after an extension to wix i could use. I have actually now created my own extension which allows you to pass in an application name and it returns the version installed... I will post up my solution once i have cleaned it up. –  Nov 29 '11 at 15:03

1 Answers1

6

Using the answer given by @Ciprian, you could simply set a property, then have a launch condition based on the property.

<Property Id="OFFICEPATH">
  <RegistrySearch Id="OfficeReg" Root="HKLM" Key="SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot" Name="Path" Type="raw" />
</Property>

<Condition Message="This application requires Microsoft Office. Please install Office then run this installer again.">
      <![CDATA[Installed OR (OFFICEPATH)]]>
    </Condition>
David Martin
  • 11,764
  • 1
  • 61
  • 74
  • 1
    Thanks for the answer, I was really after fetching the current version installed of an application, not querying for a known registry key. I have solved this by creating my own wix extension which allows you to pass in an application name and it tells you what version is installed –  Nov 29 '11 at 15:04
  • @JoeHealy See: http://stackoverflow.com/questions/3266675/how-to-detect-installed-version-of-ms-office lists up to 2016 – David Martin Mar 31 '16 at 09:29