@echo off>nul if /i %PROCESSOR_ARCHITECTURE%==x86 goto :32 if defined PROCESSOR_ARCHITEW6432 goto :wow64 echo Processus 64 bits natif sur une plateforme %PROCESSOR_ARCHITECTURE% goto :end :32 if defined PROCESSOR_ARCHITEW6432 goto :wow64 echo Processus 32 bits natif goto :end :wow64 echo Processus 32 bits sur une plateforme 64 bits :end @pause goto :eof ============================================= NOTES ===== Sur une plateforme 64 bits tester avec : C:\Windows\System32\cmd.exe C:\Windows\SysWOW64\cmd.exe HOWTO: Detect Process Bitness http://blogs.msdn.com/david.wang/archive/2006/03/26/HOWTO-Detect-Process-Bitness.aspx == Native == 32bit 64bit WOW64 PROCESSOR_ARCHITECTURE x86 AMD64 x86 PROCESSOR_ARCHITEW6432 = undefined = AMD64/IA64 WOW64 = 32bit Program on 64bit OS Replace AMD64 with IA64 for Itaniums WOW64 http://en.wikipedia.org/wiki/WOW64 WOW64 Implementation Details http://msdn.microsoft.com/en-us/library/aa384274 Thread : http://groups.google.com/group/microsoft.public.fr.windows.vista.administration/browse_frm/thread/fd11ce1132af1770/ 22/09/2009 http://fspsa.free.fr/ http://fspsa.free.fr/os6432.cmd