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

3

6

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!

Carabao answered 2/10, 2012 at 7:28 Comment(0)
M
6

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.

Machmeter answered 2/10, 2012 at 15:35 Comment(3)
So my only option is to make two installers, one 32 bit and another 64 bit?Carabao
This is how I solved it: I made a x64 bit console app that does the job for me which i then run during the installation, and then remove when i'm done. Not very pretty but it works, as it is only one key i need to write :)Carabao
No longer true - see the other comment below about using Win65=yes + suppression of ICE80Erminna
I
2

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.

Inroad answered 20/5, 2016 at 14:48 Comment(0)
S
0

Add Win64="yes" to the registry entry you want to put in the 64-bit in the registry..:) I have not included the condition in my own and it works perfectly with just the Win64 attribute.

Sizing answered 2/10, 2012 at 8:29 Comment(6)
I removed the condition and it is still giving me the same error :/ Do you have the x86 and the x64 components in the same package? Or maybe it has to do with the Wix version? I'm running 3.5Carabao
Are you getting any error if you take the win64 attribute out?Sizing
Is package platform attribute is set to x86?Carabao
Hi, sorry I am mistaken, I have two msi's being created one 32-bit and the other 64-bit. Apologies I got mixed up..:(Sizing
Why don't you use a custom action if it is only one key?Sizing
The problem with that is that my CustomAction.dll is also a in 32-bit. This is how I solved it: I made a x64 bit console app that does the job for me which i then run during the installation, and then remove when i'm done!Carabao

© 2022 - 2024 — McMap. All rights reserved.