![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How to check if the OS is 64 bit or 32 bit? Hi all, I want to check if the OS is 64 bit or 32 bit using vbscript. I'm currently reading the registry key - HKEY_LOCAL_MACHINE\SYSTEM \CurrentControlSet\Control\Session Manager\Environment \PROCESSOR_ARCHITECTURE and checking the architecture. My question is - Will this return the architecture of the OS or the architecture of the processor? i.e., if a 32-bit Windows OS is installed on 64 bit Processor, what will this return? Thanks in advance for your help! |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How to check if the OS is 64 bit or 32 bit? "Gugle" <gugle.rulez@xxxxxx> wrote in message news:86d06b46-12bb-47b5-b8cc-57d0389f1643@xxxxxx Quote: > Hi all, > I want to check if the OS is 64 bit or 32 bit using vbscript. I'm > currently reading the registry key - HKEY_LOCAL_MACHINE\SYSTEM > \CurrentControlSet\Control\Session Manager\Environment > \PROCESSOR_ARCHITECTURE and checking the architecture. My question is > - Will this return the architecture of the OS or the architecture of > the processor? i.e., if a 32-bit Windows OS is installed on 64 bit > Processor, what will this return? > > Thanks in advance for your help! with 32-bit Vista. -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How to check if the OS is 64 bit or 32 bit? "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in message news:uiupR6ZdJHA.1528@xxxxxx Quote: > > "Gugle" <gugle.rulez@xxxxxx> wrote in message > news:86d06b46-12bb-47b5-b8cc-57d0389f1643@xxxxxx Quote: >> Hi all, >> I want to check if the OS is 64 bit or 32 bit using vbscript. I'm >> currently reading the registry key - HKEY_LOCAL_MACHINE\SYSTEM >> \CurrentControlSet\Control\Session Manager\Environment >> \PROCESSOR_ARCHITECTURE and checking the architecture. My question is >> - Will this return the architecture of the OS or the architecture of >> the processor? i.e., if a 32-bit Windows OS is installed on 64 bit >> Processor, what will this return? >> >> Thanks in advance for your help! > Mine shows "x86" or that registry setting. I have AMD Turion 64 X2 TL-56 > with 32-bit Vista. > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab - http://www.rlmueller.net > -- > =========== Option Explicit Dim strComputer, objWMIService, colSettings, objProcessor strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ & strComputer & "\root\cimv2") Set colSettings = objWMIService.ExecQuery _ ("SELECT * FROM Win32_Processor") For Each objProcessor In colSettings Wscript.Echo "System Type: " & objProcessor.Architecture Wscript.Echo "Processor: " & objProcessor.Description Next ====== You can parse objProcessor.Description for "x64" to check for 64-bit (or "x86" for 32-bit). The system type (objProcessor.Architure) returns 9 on my machine, but I need to research what the number means. -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How to check if the OS is 64 bit or 32 bit? On Jan 13, 9:57*pm, "Richard Mueller [MVP]" <rlmueller- nos...@xxxxxx> wrote: Quote: > "Richard Mueller [MVP]" <rlmueller-nos...@xxxxxx> wrote in > messagenews:uiupR6ZdJHA.1528@xxxxxx > > > > > Quote: > > "Gugle" <gugle.ru...@xxxxxx> wrote in message > >news:86d06b46-12bb-47b5-b8cc-57d0389f1643@xxxxxx Quote: > >> Hi all, > >> I want to check if the OS is 64 bit or 32 bit using vbscript. I'm > >> currently reading the registry key - HKEY_LOCAL_MACHINE\SYSTEM > >> \CurrentControlSet\Control\Session Manager\Environment > >> \PROCESSOR_ARCHITECTURE and checking the architecture. My question is > >> - Will this return the architecture of the OS or the architecture of > >> the processor? i.e., if a 32-bit Windows OS is installed on 64 bit > >> Processor, what will this return? Quote: Quote: > >> Thanks in advance for your help! Quote: > > Mine shows "x86" or that registry setting. I have AMD Turion 64 X2 TL-56 > > with 32-bit Vista. Quote: > > -- > > Richard Mueller > > MVP Directory Services > > Hilltop Lab -http://www.rlmueller.net > > -- > You should be able to use the Win32_Processor class of WMI. For example: > =========== > Option Explicit > > Dim strComputer, objWMIService, colSettings, objProcessor > > strComputer = "." > > Set objWMIService = GetObject("winmgmts:" _ > * * & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ > * * & strComputer & "\root\cimv2") > > Set colSettings = objWMIService.ExecQuery _ > * * ("SELECT * FROM Win32_Processor") > > For Each objProcessor In colSettings > * * Wscript.Echo "System Type: " & objProcessor.Architecture > * * Wscript.Echo "Processor: " & objProcessor.Description > Next > ====== > You can parse objProcessor.Description for "x64" to check for 64-bit (or > "x86" for 32-bit). The system type (objProcessor.Architure) returns 9 on my > machine, but I need to research what the number means. > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab -http://www.rlmueller.net > -- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| spell check wont check english/ | Vista mail | |||
| Anyone know how to fix/check WU? | Windows Updates | |||
| You really need to check this out | PowerShell | |||
| check this out | Vista General | |||
| Newbie: Nagios with nrpe_nt, check for diskspace; check services,returncode | PowerShell | |||