How to determine whether an Windows OS is 64 bit or not from Registry Editor<p align=left><font face=Arial size=2></font> </p> <p>Hi ,</p> <p align=left> </p> <p align=left>I need to run a batch file to check whether an operating system is 32 bit or 64 bit .This need to be checked in registry only .I am able to check for 32 bit OS However I never checked for 64 bit OS .So can anyone pls guide me how to know whether the OS is 64 bit or not ?</p> <p align=left> </p> <p align=left>We need to retrieve from Registry but not basing on the Hardware or the Processor Architecture .Is there any dword value please send me the response </p> <p align=left> </p> <p align=left>Thanx a lot folks............! </p> <p align=left> </p>© 2009 Microsoft Corporation. All rights reserved.Thu, 14 May 2009 06:46:56 Z4f61b353-4476-4e85-b792-1a7d2a1910b1http://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#4f61b353-4476-4e85-b792-1a7d2a1910b1http://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#4f61b353-4476-4e85-b792-1a7d2a1910b1VenuGopal545http://social.microsoft.com/Profile/en-US/?user=VenuGopal545How to determine whether an Windows OS is 64 bit or not from Registry Editor<p align=left><font face=Arial size=2></font> </p> <p>Hi ,</p> <p align=left> </p> <p align=left>I need to run a batch file to check whether an operating system is 32 bit or 64 bit .This need to be checked in registry only .I am able to check for 32 bit OS However I never checked for 64 bit OS .So can anyone pls guide me how to know whether the OS is 64 bit or not ?</p> <p align=left> </p> <p align=left>We need to retrieve from Registry but not basing on the Hardware or the Processor Architecture .Is there any dword value please send me the response </p> <p align=left> </p> <p align=left>Thanx a lot folks............! </p> <p align=left> </p>Fri, 08 Feb 2008 12:16:57 Z2008-02-08T12:16:57Zhttp://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#d515a199-8b98-4143-bf5f-143fe782393ahttp://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#d515a199-8b98-4143-bf5f-143fe782393aRyan Waitehttp://social.microsoft.com/Profile/en-US/?user=Ryan%20%20WaiteHow to determine whether an Windows OS is 64 bit or not from Registry Editor<p align=left><font face=Arial size=2>I'm not sure how to do this from the registry but while researching for another post I figured out how to do this by querying WMI from PowerShell. This might work nicely for you if you're writing a script. The PowerShell script is:</font></p> <p align=left> </p> <p align=left>    Get-WmiObject -class &quot;Win32_Processor&quot; -property &quot;AddressWidth&quot;</p> <p align=left> </p> <p align=left>If the AddressWidth is &quot;32&quot; then you're on a 32-bit operating system. If the AddressWidth is &quot;64&quot; then you're on a 64-bit operating system.</p> <p> </p> <p align=left>A similar VB Script implementation is posted at: <a title="http://www.msfn.org/board/lofiversion/index.php/t90278.html" href="http://www.msfn.org/board/lofiversion/index.php/t90278.html">http://www.msfn.org/board/lofiversion/index.php/t90278.html</a>. </p> <p align=left> </p> <p align=left>Ryan Waite</p>Fri, 08 Feb 2008 19:11:16 Z2008-02-08T19:11:16Zhttp://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#cf587fca-161d-48b3-a4e5-11b0a2cc6810http://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#cf587fca-161d-48b3-a4e5-11b0a2cc6810progman32http://social.microsoft.com/Profile/en-US/?user=progman32How to determine whether an Windows OS is 64 bit or not from Registry Editor<p align=left><font face=Arial size=2>In the Windows (XP) registry look for :</font></p> <p align=left><font face=Arial size=2>\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion</font></p> <p align=left>Look at CurrentBuildNumber = &quot;####&quot;</p>We determine OS type usually by build number (i.e. XP 32-bit = 2600, XP 64-bit 3790)Thu, 03 Apr 2008 01:37:08 Z2008-04-03T01:37:08Zhttp://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#d10210a8-89b5-4b26-b35a-61181c273fd7http://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#d10210a8-89b5-4b26-b35a-61181c273fd7Jarred Clorehttp://social.microsoft.com/Profile/en-US/?user=Jarred%20CloreHow to determine whether an Windows OS is 64 bit or not from Registry Editor<p><span> You can do an IsWow64Process API call to see:</span></p> <p align=left><span> </p> <blockquote dir=ltr style="margin-right:0px"> <p>typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);<br></p> <p>BOOL IsWow64()<br>{</p> <p>    BOOL bIsWow64 = FALSE; // assume 32 bit<br> <br>    // can't call IsWow64Process on x32, so first look up the entry point in kernel32<br>    LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle (&quot;kernel32&quot;),&quot;IsWow64Process&quot;);<br> // if we have an entry point for IsWow64Process, we can call it<br>    if (NULL != fnIsWow64Process)<br>    {<br>        if (!fnIsWow64Process(GetCurrentProcess(),&amp;bIsWow64))<br>        {<br>            // handle error<br>        }<br>    }<br>    return bIsWow64;<br>}</p></blockquote></span> <p align=left><font face=Arial size=2></font> </p>Wed, 09 Apr 2008 21:54:17 Z2008-04-09T21:54:17Zhttp://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#65ce5d94-98e8-4fb0-a151-fc39bfe63badhttp://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#65ce5d94-98e8-4fb0-a151-fc39bfe63badJByy4uhttp://social.microsoft.com/Profile/en-US/?user=JByy4uHow to determine whether an Windows OS is 64 bit or not from Registry Editor<p align=left><font face=Arial size=2>Caution:  The below only shows whether or not your system is capable of running an x64 OS but that doesn't mean you're running x64.</font></p> <p align=left> </p> <p align=left>Get-WmiObject -class &quot;Win32_Processor&quot; -property &quot;AddressWidth&quot;</p> <p align=left> </p> <p align=left>If no one has a better solution to determine the running os as being x64 then I'm tempted to just look and see if the c:\program files (x86) folder exists and if so assume it's 64-bit.  Or maybe just parse the boot.ini.  </p> <p align=left> </p> <p align=left>JB</p>Thu, 10 Apr 2008 05:20:23 Z2008-04-10T05:20:23Zhttp://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#f2c577de-30d4-44c2-972b-e9dc89d08a56http://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#f2c577de-30d4-44c2-972b-e9dc89d08a56carter_chenhttp://social.microsoft.com/Profile/en-US/?user=carter_chenHow to determine whether an Windows OS is 64 bit or not from Registry Editor<p align=left><font face=Arial size=2>You can also do this in PowerShell:</font></p> <p align=left>$env<img alt="Stick out tongue" src="http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif">ROCESSOR_ARCHITECTURE</p> <p align=left> </p> <p align=left>Christina</p>Wed, 16 Apr 2008 07:10:52 Z2008-04-16T07:10:52Zhttp://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#8530079e-8b41-41d7-ad74-043ae5b3fef9http://social.microsoft.com/Forums/en-US/windowshpcitpros/thread/4f61b353-4476-4e85-b792-1a7d2a1910b1#8530079e-8b41-41d7-ad74-043ae5b3fef9welemonhttp://social.microsoft.com/Profile/en-US/?user=welemonHow to determine whether an Windows OS is 64 bit or not from Registry EditorReally? In MSDN, it is described as:<br/> <dl><dt><strong><span style="background-color:#3399ff;color:#ffffff">AddressWidth</span> </strong> </dt> <dd> <dl><dt>Data type: <strong>uint16</strong> </dt> <dt>Access type: Read-only </dt> </dl> <p></p> <p>On a 32-bit operating system, the value is 32 and on a 64-bit operating system it is 64. This property is inherited from <strong>CIM_Processor</strong> .</p> </dd> <dt></dt> </dl> and I tested with XP64 Vista32 XP32.  It shows the info of OS, not the CPU.Thu, 14 May 2009 06:46:30 Z2009-05-14T06:46:30Z