Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing in the x64 part of the registry with an otherwise x86 mai pack created in Wix

I'm writing an installer pack for a product using Wix, the whole thing is in x86, but now i need to add a key to the x64 part of the registry. I looked around and found this stack answer which I thought would solve my problem. But I'm getting a ICE80 error (not a warning) which tells me that I basically need to change my Package Platform attribute to x64.

I would however rather avoid that because as I mentioned it's only one registry key that needs to be in x64.

So my question is: Is there another way to resolve the ICE80 error or do I need to build two msi packages, one for x86 and one for x64.

Here is some of my code to further illustrate what I'm trying to do:

        <Component Id="Foo" Guid="{GUID}" Win64="yes">
    <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\IniFiles">
      <RegistryValue Type="integer" Name="Hello" Value="1"/>
    </RegistryKey>
    <Condition><![CDATA[VersionNT64]]></Condition>
  </Component>

  <Component Id="Bar" Guid="{GUID}">
    <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\IniFiles">
      <RegistryValue Type="integer" Name="Hello" Value="1"/>
    </RegistryKey>
  </Component>

Any help is appreciated!

like image 313
A.Game Avatar asked Oct 02 '12 07:10

A.Game


2 Answers

Windows Installer doesn't support a 32-bit package writing to the 64-bit registry (or file system). A 64-bit package can write to both 32-bit and 64-bit portions.

like image 135
Bob Arnson Avatar answered Sep 25 '22 12:09

Bob Arnson


Perhaps it didn't work then. I am using Wix v10 and in my x86 WIX project, and adding Win64="yes"initially generated ICE80 error. Once I suppressed that warning (in Visual Studio, "Tool Settings" -> "Suppress specific validation:" column), I no longer get that error. When I ran the x86 installer on Windows 2012 R2, those x64 reg keys were created.

like image 42
Petronius Avatar answered Sep 24 '22 12:09

Petronius