3

I have a WiX installer for an x86 application. However, it needs to write to the x64 region of the registry for a single component. To do this, I have something like the following

<Component Id=foo"..." Win64="yes">
  <Condition>VersionNT64</Condition>
  <RegistryValue
    Root="HKLM" Key="SOFTWARE\Microsoft\...."
    ....
</Component>

.....

<Feature Id='MyFeature' Level='0'> 
    <ComponentRef Id='foo' /> 
<Condition Level='1'>VersionNT64</Condition> 
</Feature>

This works fine when I try to run the installer on an x64 system. When I run on an x86 system(Even though I don't expect this component to be installed due to the condition), I get the following error:

SchedSecureObjectsRollback_x64 3: SchedSecureObjectsRollback 4: C:\Windows\Installer\MSIA98C.tmp 
MSI (c) (84:80) [20:31:05:701]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. ............

If I take out the Win64 attribute, all works fine. However, I do need the Win64 attribute for x64 systems.

Any ideas would be appreciated, thanks!

jquan
  • 41
  • 1
  • 5
  • 1
    I don't see any errors... I have a wix installer that does the same thing, and the parts of your code that you show here are identical to mine. Can you post more code? – Nate Hekman Mar 05 '13 at 19:09
  • VersionNT64 – jquan Mar 05 '13 at 20:03
  • If you have Validation enabled you should see an ICE80 error. – Christopher Painter Mar 05 '13 at 20:22
  • I am deliberately suppressing ICE80 warnings in order to write to the x64 region from the x86 installer. – jquan Mar 05 '13 at 20:29
  • This answer here: http://stackoverflow.com/a/2577367/2136966 is what i am trying to do and it works when running the x86 installer on an x64 platform, but not an x86 platform – jquan Mar 05 '13 at 20:35

2 Answers2

4

The Windows Installer does not support creating an x86 package that writes to 64-bit locations. You have to make a 64-bit package. It's an age old limitation that everyone get's upset about.

Instead, you need to create a 64-bit MSI package for 64-bit stuff then you can put that into a Bundle with a 32-bit MSI package. The MsiPackage element can have an InstallCondition to determine when to install the 64-bit package.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • That's what I keep reading, but before I completely wave the white flag, I guess I just don't understand why it seems that some people are doing what I am trying to do successfully? see answer above and also at http://stackoverflow.com/a/8229503/2136966 – jquan Mar 06 '13 at 01:54
  • Hmm, well I figured out that I get the error because I was using the PermissionEx element when creating the registry item to change the permission level. That seems to cause the action SchedSecureObjectsRollback_x64 to be called. If I remove that element, the install actually works. – jquan Mar 06 '13 at 18:01
0

Remove the Condition from the Feature. You already have that condition in the Component.

<Feature Id='MyFeature' Level='1'>
    <ComponentRef Id='foo' />
</Feature>

Honestly I don't know for sure that will fix the problem, but in my own Wix setup I have code that's nearly identical but I've put the Condition only in the Component, not in the Feature, and it works as I expect: installs that component & writes the Registry key only on x64, while installing everything else on x86 or x64.

Nate Hekman
  • 6,507
  • 27
  • 30
  • Thanks for the suggestion, but unfortunately that did not work for me. By the way, in your example, Level would have to be equal to 1 for the feature to be enabled. – jquan Mar 05 '13 at 21:10
  • Good point. It is at Level 1 in my project, so I guess that's another difference. Sorry that didn't fix it for you. I'm out of ideas. :-( – Nate Hekman Mar 05 '13 at 21:15