I have a Wix Toolset project with a component such as the one below, where MYLANGUAGE is a public property that can be set when installing the product:
<Component Id='language_reg' Guid='*' Permanent='yes'>
<Condition>MYLANGUAGE</Condition>
<RegistryValue Type='string' Root='HKLM' Key='Software\MyCompany\MyProduct' Name='language'
Value='[MYLANGUAGE]' KeyPath='yes' />
</Component>
Now I am upgrading this software package from 32-bit 64-bit. The key above from the existing 32-bit versions of my software is stored under HKLM\Software\WOW6432Node\MyCompany\MyProduct because of WOW64.
After an upgrade to a new 64-bit version of the package the upgrade I would like to have the value set in the HKLM\Software\MyCompany\MyProduct key too. The value shall be set like this:
- If the public property MYLANGUAGE is set when installing then the value of that property shall be stored in HKLM\Software\MyCompany\MyProduct language
- If the public property MYLANGUAGE is not set and HKLM\Software\MyCompany\MyProduct key doesn't exist and HKLM\Software\WOW6432Node\MyCompany\MyProduct language value is set then I want the value copied from HKLM\Software\WOW6432Node\MyCompany\MyProduct language to HKLM\Software\MyCompany\MyProduct language
How can I do this with WIX Toolset?