Reputation: 2661
I use WIX
to create an MSI installer for a DLL.
I would like to make one installer that allows to install the program on 64 bit platform just as on 32 bit.
The registry entries I have to define, are different for 32 and 64 bit.
This is the entry where I have to create a key in case it is 64 bit platform:
H_KEY_LOCALMACHINE\Software\Wow6432Node\Sparx Systems\EAAddins\AdminAddins
This is the entry where I have to create a key in case it is 32 bit platform:
H_KEY_LOCALMACHINE\Software\Sparx Systems\EAAddins\AdminAddins
This is how the registry entries are defined in code:
<Component Id="AdminAddinsRegEntries" Guid="8777A7AB-B147-4850-9F25-65011306E9C6" >
<RegistryKey Root="HKLM" Key="Software\Wow6432Node\Sparx Systems\EAAddins\AdminAddins" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="AdminAddins.MyClass" />
</RegistryKey>
</Component>
How can I add the condition to avoid two different installers?
Upvotes: 0
Views: 409
Reputation: 612844
You just need to make a 32 bit install package. That's all. The system, through the registry redirector, will handle all the details of the separate 32/64 bit registry views for you.
The 32 bit package is processed by a 32 bit process when installed on a 64 bit system and is subject to registry redirection. The redirector will arrange for the key to be written in the 32 bit view of the registry.
You should not hardcode the Wow6432Node
string. Just in case you miss that bit, let me say it again. You should not hardcode the Wow6432Node
string.
So, to summarise:
Software\Sparx Systems\EAAddins\AdminAddins
as the registry key.Upvotes: 2