Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
716 views
in Technique[技术] by (71.8m points)

.net - VSTO x64 runtime installed but can't be found

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="SOFTWAREMicrosoftvsto runtime setupv4RVSTORFeature_CLR40" Name="Version" Type="raw" Win64="$(var.win64Flag)"/>
</Property>

<Property Id="OFFICERUNTIME">
    <RegistrySearch Id="OfficeRuntime" Root="HKLM" Key="SOFTWAREMicrosoftVSTO Runtime Setupv4" 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

On x64 systems WoW64 apps are transparently redirected into Wow6432Node node of the registry, so they actually look for a key like HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftVSTO Runtime Setup there it is located. But the real x64 apps look into real HKEY_LOCAL_MACHINESOFTWAREMicrosoftVSTO Runtime Setup node, 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 with Wow6432Node path part.

This is called Registry Reflection and covered in details here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...