Reputation: 41
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!
Upvotes: 3
Views: 3167
Reputation: 35866
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.
Upvotes: 4
Reputation: 6657
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.
Upvotes: 0