Hi Tobias,

Duplicating the RegistrySearch with Win64 "yes" and "no" seems to do the trick. 
I can see two entries in the RegLocator table and when I run the MSI on x64 
system it does read the right registry key. The two records in the RegLocator 
table have different values in the "Type" column. I'm guessing one is for x64 
while the other must be for Wow6432 node.

Here's the slightly modified version of the AppFabric detection code:

  <Property Id="APPFABRIC">
    <RegistrySearch Id="AppFabricRegistry" Type="raw" Root="HKLM" 
Key="SOFTWARE\Microsoft\AppFabric\v1.0" Name="ProductVersion" Win64="no" />
  </Property>
  <Property Id="APPFABRICX64">
    <RegistrySearch Id="AppFabricRegistryX64" Type="raw" Root="HKLM" 
Key="SOFTWARE\Microsoft\AppFabric\v1.0" Name="ProductVersion" Win64="yes" />
  </Property>

  <Condition Message="Microsoft AppFabric was not found on this machine. Please 
install Microsoft AppFabric.">
    <![CDATA[(APPFABRIC OR APPFABRICX64) OR Installed]]>
  </Condition>

I have confirmed this by renaming the AppFabric registry value temporarily on 
both x86 and x64 test systems. I get the error, as expected, when the registry 
key is not found.


Cheers
Sharad


-----Original Message-----
From: Tobias S [mailto:tobias.s1...@gmail.com] 
Sent: Thursday, 9 December 2010 8:46 a.m.
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Can RegistrySearch read 64bit hive from32bitpackage?

@ Pally: Without trying I'd say when building with summary information
template = intel WiX also should build a package that ignores the
Win64="yes" parameter and therefore search also the wowtree on a x64
system? Had the issue sometimes before and the only solution was a
InstallScript InstallScript CA for handling that. (Was an
InstallShield solution and not a WiX project)

2010/12/8 Sharad Patel <spa...@winscribe.com>:
> Hi Igor. Thanks for that. After reading your and Pally's message I
> realized that the project had "warnings as errors" setting turned on,
> which is why the build was failing with the ICE error. I think I will
> use the Win64 attribute and suppress the warning for now.
>
> @Tobias. Thanks for your suggestion too. Eventually we want to be able
> to support both x86 and x64 systems natively but that could take a
> while.
>
> @Peter. I'm not sure about the upgrade table but I will surely look it
> up. Thanks.
>
> @Pally. Thank you for your detailed example on how to duplicate the
> RegistrySearch and your warning suppression suggestion. I will just use
> your code and suppress the ICE warning for now.
>
> @Neil. Thanks. I thought DTF's dependency was .NET Framework 2.0? In any
> case our product is based on .NET 4.0. we already have a condition for
> checking that, so it wouldn't be a problem for us to write a managed
> custom action based to .NET 4.0.
>
>
> Cheers
> Sharad Patel
>
>
> -----Original Message-----
> From: Igor Paniushkin [mailto:ipaniush...@sdl.com]
> Sent: Wednesday, 8 December 2010 11:05 p.m.
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Can RegistrySearch read 64bit hive from
> 32bitpackage?
>
> Hi Sharad,
>
> There was already discussion in Wix-users about Registry and 64-32 bit
> redirection.
> I think it is not supported (documented) scenario by Microsoft
> Installer, but you can specify Win64="Yes" as you wrote already, but
> also suppress validation of ICE.
> It should search in 64 bit branch of registry (without redirection).
>
> Igor
>
>
> -----Original Message-----
> From: Sharad Patel [mailto:spa...@winscribe.com]
> Sent: Wednesday, December 08, 2010 10:58 AM
> To: WiX-users@lists.sourceforge.net
> Subject: [WiX-users] Can RegistrySearch read 64bit hive from 32bit
> package?
>
> We are currently using the v3.5 RC build.
>
> We have a 32bit installer that detects AppFabric using the following bit
> of WiX code:
>
>
>  <Property Id="APPFABRIC">
>    <RegistrySearch Id="AppFabricRegistry" Type="raw" Root="HKLM"
> Key="SOFTWARE\Microsoft\AppFabric\v1.0" Name="ProductVersion" />
>  </Property>
>
>  <Condition Message="Microsoft AppFabric was not found on this machine.
> Please install Microsoft AppFabric.">
>    <![CDATA[APPFABRIC <> ""]]>
>  </Condition>
>
>
> This works fine on 32bit systems but we get an error when the installer
> is run on x64 systems because AppFabric registry key only exists in the
> 64bit hive. If I try to use the Win64="yes" attribute on the
> RegistrySearch element then I get an "error LGHT1076: ICE80". All the
> searching I have does seems to suggest that 32bit packages can't access
> 64bit hive.
>
> Our application and the installer are both 32bit only. Of course without
> the RegistrySearch condition the installer works just fine on x64
> systems but we would like to be able to detect AppFabric.
>
> So far writing an unmanaged (or managed) custom action seems like our
> only option.
> Is there a way to achieve this without a custom action?
>
>
> Thanks
> Sharad Patel

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to