Solved

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

Posted on 2011-03-25
11
441 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
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MDT Task Sequence 23 44
Mutiple Folder view (5 Folder view) 3 48
Windows Live Mail to Outlook 2010 Windows 10 6 49
SBS 2011 server backup failing. 27 40
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
An article on effective troubleshooting
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
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 …

735 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