I wrote a simple command line application that will tell you whether your processor and your OS are either 64-bit or 32-bit.
Readout example:
C:\bitchecker
The CPU is 64-bit and the OS is 32-bit
Per request, here is the source, compiled using CLI option, written in AutoIt.
If @CPUARCH = "x86" Then
$CPUARCH = "32-bit"
Else
$CPUARCH = "64-bit"
EndIf
If @OSARCH = "x86" Then
$OSARCH = "32-bit"
Else
$OSARCH = "64-bit"
EndIf
ConsoleWrite("The CPU is " & $CPUARCH & " and the OS is " & $OSARCH)
And here is an example if you want switches for CPU (-c) and OS (-o):
Dim $CPUARCH, $OSARCH
If @CPUARCH = "x86" Then
$CPUARCH = "32-bit"
Else
$CPUARCH = "64-bit"
EndIf
If @OSARCH = "x86" Then
$OSARCH = "32-bit"
Else
$OSARCH = "64-bit"
EndIf
If $CmdLine[0] = 0 Then
ConsoleWrite("The CPU is " & $CPUARCH & " and the OS is " & $OSARCH)
Else
Select
Case $CmdLine[1] = "-c"
ConsoleWrite($CPUARCH)
Case $CmdLine[1] = "-o"
ConsoleWrite($OSARCH)
Case Else
ConsoleWrite("The CPU is " & $CPUARCH & " and the OS is " & $OSARCH)
EndSelect
EndIf
Use :
uname -a
for linux system , Did u see how it is so simple with linux ? if so , delete windows and install linux – Abdennour TOUMI – 2014-06-26T10:59:00.5431Hmm, it's sad that
systeminfo
does not list this. – Tamara Wijsman – 2011-08-11T17:50:25.977@MaQleod - I'd personally argue that just because your answer suits both, that the questions aren't exact duplicates because this one is a much more specific scenario. I don't know if your answer quite fits 'command line only' since it needs an extra utility, but if it were me I'd post it as an answer here. – Shinrai – 2011-08-11T18:13:55.277
@MaQleod I personally wouldn't call it a duplicate since it's asking for a specifically command-line only solution. The question you linked has an accepted answer for a GUI solution. – Ben Richards – 2011-08-11T18:14:14.777
1Thank you for the edit + answers. I chose the answer that best suited my situation. – Negative – 2011-08-11T18:16:59.987
I ended up finding what IS an exact duplicate of this. (Linked post specifically references command-line only, and even provides my exact solution.) – Shinrai – 2011-08-12T14:58:19.140