[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

64-bit or 32-bit

Posted on 2006-03-23
3
Medium Priority
?
695 Views
Last Modified: 2008-01-09
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.
0
Comment
Question by:mpenuel
  • 2
3 Comments
 
LVL 7

Expert Comment

by:Focusyn
ID: 16270990
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.  
0
 
LVL 7

Accepted Solution

by:
Focusyn earned 2000 total points
ID: 16271017
Reg key should be HKLM/Software/Microsoft/Windows/CurrentVersion/ProductID - I just checked a couple versions and found it there as GUID.
0
 

Author Comment

by:mpenuel
ID: 16271083
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.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Make the most of your online learning experience.
Introduction to Processes
Starting up a Project

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question