Use LIEF with Python for introspection of executable files.
python print_imports.py $Env:WINDIR/System32/notepad.exepython detect_windows_exe_arch.py c:/path/to/my.exeFrom Windows PowerShell invoking Python:
python detect_windows_exe_arch.py $Env:WINDIR/System32/ntdll.dllArchitecture: ARM64 (native) (ARM64X hybrid - native ARM64 + Arm64EC/x64 interop)
python detect_windows_exe_arch.py $Env:WINDIR/System32/notepad.exeArchitecture: ARM64 (native)
python detect_windows_exe_arch.py "$Env:ProgramFiles/MATLAB/R2026a/bin/matlab.exe"On an ARM64 laptop:
Architecture: x86 (32-bit Intel)
GNU Octave installer:
python detect_windows_exe_arch.py octave-11.0.92-w64-installer.exeArchitecture: x64 (64-bit)