Escribí una aplicación de línea de comando simple que le dirá si su procesador y su sistema operativo son de 64 bits o de 32 bits.
Ejemplo de lectura:
C:\bitchecker
The CPU is 64-bit and the OS is 32-bit
Por solicitud, aquí está la fuente, compilada usando la opción CLI, escrita en 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)
Y aquí hay un ejemplo si desea interruptores para CPU (-c) y 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
systeminfo
no enumere esto.