(view source code of is6432os.bat as plain text)
@ECHO OFF
SETLOCAL
IF "%~1"=="" (SET Computer=%ComputerName%) ELSE (SET Computer=%~1)
IF /I NOT "%Computer%"=="%ComputerName%" (
PING %Computer% -n 2 2>NUL | FIND "TTL=" >NUL || GOTO Syntax
)
FOR /F "tokens=2 delims==" %%A IN ('WMIC /Node:%Computer% Path Win32_Processor Get AddressWidth /Format:list') DO SET OSB=%%A
ECHO %OSB%-bit
EXIT /B %OSB%
:Syntax
ECHO.
ECHO is6432os.bat, Version 1.00 for Windows XP Professional and later
ECHO Detect if the OS is 32-bit or 64-bit
ECHO.
ECHO Usage: IS6432OS.BAT
ECHO.
ECHO Return: return code 32 for 32-bit OS, 64 for 64-bit, or 1 for error
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
EXIT /B 1
page last modified: 2024-04-16; loaded in 0.0048 seconds