It was, in my opinion, a very elegant way.
If you place the declaration of the <iis:WebAppPool> in <Component> , marked as Win64="yes" , the application pool will be created with the Enable32bit flag set to false . Otherwise (i.e. by default) it will be created with Enable32bit set to true .
I'm not sure how it will behave when you do not create an application pool with your installation, but instead refer to an existing one. I expect him to not change this flag at all. You can experiment with this to find out how it works.
And note: I would not install into an existing application pool or website. It is much more difficult to maintain - remember that after uninstallation you must leave the machine in the "before installation" state. This means that you have to support backing up / restoring the state of everything that you change with custom actions ... Brrr ...
Yan sklyarenko
source share