Chris Young
Chris Young

Reputation: 129

WiX not writing registry values (Win 7 x64)

I am new to WiX and I have become completely stumped as to how to create registry keys during the installation process. I am using the RegistryKey and RegistryValue elements like this:

<Component Id="RegKeys" Guid="824A9E7D-211C-4404-80F7-6AC4185B1E66">
    <RegistryKey Action="createAndRemoveOnUninstall" Root="HKLM" Key="SOFTWARE\My\Path">
        <RegistryValue Name="MyKey" Type="string" Value="Blah blah blah"/> 
    </RegistryKey>
</Component>

with a corresponding call to ComponentRef for the main feature:

<ComponentRef Id="RegKeys"/>

The installer builds fine and runs without any apparent errors but no keys or values are created under the Wow6432Node key (or anywhere else for that matter). The installer is for a 32-bit application but I am trying to install it on Windows 7 64-bit.

What am I missing (I'm sure it's something obvious)? We are using WiX 3.5.

Upvotes: 2

Views: 3567

Answers (2)

Bob Arnson
Bob Arnson

Reputation: 21896

Two things to try:

  1. Use Orca from the Windows SDK to verify the value is present in the Registry table. (This eliminates a build problem.)
  2. Check a verbose log to see what MSI is doing with the component and what it does with the registry data.

Upvotes: 4

Cosmin
Cosmin

Reputation: 21436

Is the registry value alone in its component? If so, set KeyPath to "yes".

Upvotes: 1

Related Questions