Link to home
Create AccountLog in
Avatar of mpenuel
mpenuel

asked on

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.
Avatar of Focusyn
Focusyn

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.  
ASKER CERTIFIED SOLUTION
Avatar of Focusyn
Focusyn

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of mpenuel

ASKER

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.