Hey guys,
I'm using the application model to deploy several 32-Bit and 64-Bit apps and I’m looking to simplify things a bit. Right now I'm using the built-in requirements to specify the supported OS Architectures for my 32-Bit/64-Bit only applications. This is a bit tedious as it requires me to check every single OS type I want an application to support (i.e. for 64-Bit stuff I check Windows 7 x64, Windows 8.1 x64, Windows Server 2008 R2 x64, Windows Server R2 x64 and vice versa for 32-Bit). Really all I want is some sort of requirement that lets me specify "Install for all 64-Bit OSes" or "Install for all 32-Bit OSes" depending upon the application in question.
I’ve been looking at some of the options for a custom requirement and I’m pretty sure I can use that piece to achieve the results I want, I just need to determine what condition I need to test against to make it work. Based on what I’ve read I’m thinking that checking the following registry key should work:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment
KEY: PROCESSOR_ARCHITECTURE
But I am concerned it could produce the wring result when you have a 32-Bit OS installed on a machine with a 64-Bit capable processor (I have a lot of those in my environment). I also have some older XP/2003 machines to support as well and I’m concerned that this method might not work for those systems. Has anyone here faced this same issue and come up with a solution that is relatively foolproof and (if so) would you mind sharing your solution?