![]() If not exist %SystemRoot%\SysNative\cscript.exe Echo 32 bit process If "%PROCESSOR_ARCHITEW6432%" = "AMD64" ECHO 32 bit process We can detect this with the PROCESSOR_ARCHITEW6432 variable, AMD64 = a 32 bit process under WOW64 mode: ::Is64BitOperatingSystem Detect a 64 bit Process Windows 10 on ARM includes an x86-on-ARM64 emulation, so the possible values for PROCESSOR_ARCHITECTURE are: AMD64 or IA64 or ARM64 or (for 32 bit) x86 Via David Wang’s blog post: Detect OS Bitness IF NOT DEFINED PROCESSOR_ARCHITEW6432 Set _os_bitness=32Įcho Operating System is %_os_bitness% bit ![]() In Vista and greater, you can use WMIC OS get osarchitecture, or in WMI/CIM Win32_ComputerSystem/OSArchitecture There is currently no known way of detecting this. Obviously a 64 bit OS must be running 64 bit hardware, but a 32 bit OS could also be running on 64 bit hardware. There are a number of promising looking options in WMI and Systeminfo, but they all pertain to the OS not the CPU. You can have a 64 bit CPU, a 64 bit operating system and a 64 bit process running. Before starting to look at this, its important to be clear about what you mean by "64 bit".
0 Comments
Leave a Reply. |