64-bit or 32-bit

I will be distributing the .net framework 2.0 into my environment.  I have two different .exe's (one for 32-bit, one for 64-bit).  I was wondering if anyone knew of a process or registry entry or something like that I could use in my install script to determine if the machine is 32 or 64 bit.  I don't need any code (as of yet), just a way to determine if the machine is one or the other, thanks.
mpenuelAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FocusynCommented:
Check the Windows OS build/version number in the registry.  It will be different for 64-bit version.  If a 64-bit machine is running a 32-bit OS, you'll probably need to use the 32 bit framework anyway (which is why I recommend this check as opposed to looking at actual cpu info; I think the different versions of the framework are adjusted for the 32/64 bit API calls to the OS and not actual hardware dependencies, which makes the most sense considering that most 64 bit cpu's are backward compatible and capable of running 32 bit OS).  I don't remember the exact reg key for windows build number, but it's somewhere under HKLM/Software/Microsoft/Windows.  
FocusynCommented:
Reg key should be HKLM/Software/Microsoft/Windows/CurrentVersion/ProductID - I just checked a couple versions and found it there as GUID.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mpenuelAuthor Commented:
Thanks for the repsonse, I was kind of in a hurry when try to find this, so I posted and continued research.  The key above is a good one, and I think I will use that one and HKLM\Software\WOW3264node which should also tell me if it's a 64-bit machine.

thanks again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.