Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

how can you identify if an OS is 32 or 64 bit

Posted on 2011-03-25
11
439 Views
Last Modified: 2012-05-11
is there a simple means to find the bit size of an os using a script.
0
Comment
Question by:Hilarosrags
11 Comments
 
LVL 14

Expert Comment

by:bmsjeff
ID: 35218499
xp or windows 7?
0
 
LVL 13

Expert Comment

by:JeremySBrown
ID: 35218515
If you right click "Computer" and select "Properties" under System type it will tell you if it's a 64-bit or 32-bit OS. 32-bit is also known as x86.
0
 
LVL 14

Expert Comment

by:bmsjeff
ID: 35218518
Windows 7
Right click on My computer
Click on Properties
Dialogue box will tell you under "System Type"
0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
LVL 14

Expert Comment

by:bmsjeff
ID: 35218527
XP
Click Start, and then click Run.
Type sysdm.cpl, and then click OK.
Click the General tab. The operating system is displayed as follows:
For a 64-bit version operating system: Windows XP Professional x64 Edition Version < Year> appears under System.
For a 32-bit version operating system: Windows XP Professional Version <Year> appears under System.
0
 
LVL 59

Expert Comment

by:Darius Ghassem
ID: 35218567
Go to Start Run the type msinfo32 this will bring up the information if you look at System Type this will show you.
0
 
LVL 12

Expert Comment

by:ibrahim52
ID: 35218640
If you are looking for scripts and not for command than please visit the link below. Good luck

Referred Link :
http://www.vistax64.com/vb-script/223713-how-find-operating-system-bit-x86-x64-ia64-2.html
0
 
LVL 5

Accepted Solution

by:
TomasP earned 450 total points
ID: 35218896
since you stated that the solution should be script based, this is what MS recommends as one of the ways to determine bitness of the installed Windows

 
@echo off
 
Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0
 
REG.exe Query %RegQry% > checkOS.txt
 
Find /i "x86" < CheckOS.txt > StringCheck.txt
 
If %ERRORLEVEL% == 0 (
    Echo "This is 32 Bit Operating system"
) ELSE (
    Echo "This is 64 Bit Operating System"
)
0
 
LVL 16

Assisted Solution

by:cantoris
cantoris earned 25 total points
ID: 35219675
wmic cpu get addresswidth
Returns 32 or 64.  I'm not sure what this returns from a 64-bit capable CPU running a 32-bit OS.

wmic computersystem get systemtype
Is perhaps another to look into?  eg it returns "x64-based PC" on my machine.

Attached is some VBScript based on the first possibility.
strHostname = "."
Set objSWbemServices = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strHostname & "\root\cimv2")
strWQL = "SELECT AddressWidth FROM Win32_Processor"
Set colCPUs = objSWbemServices.ExecQuery(strWQL)
For Each objCPU In colCPUs
  intWidth = objCPU.AddressWidth
  If intWidth = 32 Then
    WScript.Echo strHostname & " is 32-bit."
  Else
    WScript.Echo strHostname & " is 64-bit."
  End If
Next

Open in new window

0
 
LVL 4

Assisted Solution

by:FireW0lf
FireW0lf earned 25 total points
ID: 35231137
The question was to get this via a script

So, open a CMD prompt, and type this:
echo %processor_architecture%

Open in new window


32 bit shows "x86"
64 bit shows "AMD64" (on my AMD 64 bit Servers), or "IA64", etc

If you want to save this to a file, then simply echo %processor_architecture% > C:\CPU.txt
0
 
LVL 16

Expert Comment

by:cantoris
ID: 35231437
It depends what script language is being referred to of course.

In VBScript, you could make use of FireW0lf's suggestion like this:
 
Set objWshShell = WScript.CreateObject("WScript.Shell")
strCPUType = objWshShell.ExpandEnvironmentStrings("%Processor_Architecture%")
WScript.Echo "CPU type is " & strCPUType

Open in new window


That environment variable also returns "AMD64" on a non-Itanium Intel Processor that supports 64 bit.
0
 

Author Closing Comment

by:Hilarosrags
ID: 35231841
thanks everyone for your quick, accurate answers
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Scheduled Tasks Tweak 5 42
How to remove unwanted words? 34 48
Disk Quota Windows 2012 R2 6 98
Sharing a calendar in Outlook non Exchange Environment. 5 43
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

856 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