I created a WiX installer deploying an add in for Windows 2010. Target system is currently x64 Win & Office installed. I walked through several microsoft sites telling me that i’ll need than an x64 installer & runtime (because the add in loads into the process of current word running).
This installer checks the existence of VSTO Runtime using this statement:
<?if $(var.Platform)=x64 ?>
<?define win64Flag = "yes"?>
<?else ?>
<?define win64Flag = "no"?>
<?endif ?>
<Property Id="VSTORUNTIMEREDIST">
<RegistrySearch Id="VSTORuntimeRedist" Root="HKLM" Key="SOFTWARE\Microsoft\vsto runtime setup\v4R\VSTORFeature_CLR40" Name="Version" Type="raw" Win64="$(var.win64Flag)"/>
</Property>
<Property Id="OFFICERUNTIME">
<RegistrySearch Id="OfficeRuntime" Root="HKLM" Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4" Name="Version" Type="raw" Win64="$(var.win64Flag)"/>
</Property>
<Condition Message="The Visual Studio 2010 Tools for Office Runtime is not installed. Please install the Office Runtime.">
<![CDATA[Installed OR VSTORUNTIMEREDIST>="10.0.30319" OR OFFICERUNTIME>="10.0.21022"]]>
</Condition>
Actually it’s working for the x86 Version of my Installer, but build in x64 mode, it is unable to find the x64 entry in the registry at any time (even if the runtime is installed).
I already tried to uninstall and reinstall the runtime (with reboot acutally) but it does not worked.
I also removed the check to get my Add In installed but it’s not loading then acutally.
Therefore my question is, if there is any known bug-issue or I used the wrong registry key?
On x64 systems WoW64 apps are transparently redirected into
Wow6432Nodenode of the registry, so they actually look for a key likeHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VSTO Runtime Setupthere it is located. But the real x64 apps look into realHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTO Runtime Setupnode, and the key is, naturally, not present there. This, most probably causes your installer to fail. So, for a x64 installer you need to specify full node withWow6432Nodepath part.This is called Registry Reflection and covered in details here.