We help IT Professionals succeed at work.

How to use Windows Advanced Installer to create duplicate keys in HKLM\SOFTWARE and WOW6432

I'm building an add-in installer for Microsoft Office using Advanced Installer (AI). The AI package is defined as 32 bit and activates the add-in (which is 32 and 64 bit compatible) for All Users via the HKLM hive of the registry.

Acording to this Microsoft Article, the bitness of the Office application determines which of these two locations it looks at when activating add-ins for All Users:

MSO32 bit on WIN64 bit => HKEY_LOCAL_MACHINE\Software\WOW6432Node\...
MSO64 bit on WIN64 bit => HKEY_LOCAL_MACHINE\Software\...

Hence the add-in activation is tied via the HLKM path to the bitness of Office, not to the bitness Windows and hence not the AI package definition.

What I would like to do is create duplicate keys in both locations, whenever installing this 32-bit package on Win64. How can I achieve that?
Comment
Watch Question

Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014

Commented:

Can't you just create the registry keys as needed, in the Resources > Registry section of the interface? The Wow6432Node shows in the Registry key, so you could just add them there.

Jamie GarrochSenior Technical Consultant at BrightCarbon

Author

Commented:
Thanks Scott. I don't see the Wow6432Node in the Resources/Registry page. This is what I see:

HKEY_LOCALMACHINE\Software\[Manufacturer]

And if I click Add Value, the window that opens shows the subkey path being resolved to the Wow6432Node.
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014

Commented:

Are you doing this in Visual Studio, or in the Advanced Installer interface? The VS interface is somewhat limited, and I almost always switch over to the AI interface.


Also, have you seen this article:


https://www.advancedinstaller.com/user-guide/qa-32-64-bit-registry.html

Jamie GarrochSenior Technical Consultant at BrightCarbon

Author

Commented:
Yes, I'm in the AI UI and yes, I read and tried that article which appears to be about switching the location depending on the target platform rather than forcing the creation of the same keys in both placed. My current thinking is to create two sub-EXEs inside the main MSI, one a 32 bit package and the other a 64 bit package, just to create the keys I need. There must be a better way!
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014

Commented:

Not sure why that could be. What edition of AI are you using? Also, perhaps it would be best to contact AI about this one.



Jamie GarrochSenior Technical Consultant at BrightCarbon

Author

Commented:
I'm on 16.4.1 for AI and I noted that in the article you mentioned above it states that AI cannot create duplicate registry entries although the MSI structure suports it. I think they're abiding by the Microsoft request to not write derectly yo the phusical subkeys in the registry and instead only write to the logical one which is HKLM\SOFTWARE. That gets redirected to the same place for a 64 bit app and WOW6432Node for a 32 bit app. I'm going to try the idea above otherwise I'll have to fall back to a script to use the comand line REG ADD method to manually create all the required keys.

Post on AI created at the same time: https://www.advancedinstaller.com/forums/viewtopic.php?f=5&t=44695&p=114241#p114241

And they've just answered! https://www.advancedinstaller.com/forums/viewtopic.php?f=7&t=40921 Which I'll try before the above idea.
Senior Technical Consultant at BrightCarbon
Commented:
I've now tested the solution provided in the Advanced Installer forum which works:

https://www.advancedinstaller.com/forums/viewtopic.php?f=7&t=40921
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014

Commented:

Glad you got it resolved! I love Advanced Installer, really great tool, easy to use, and the support is very good.