0

In 64-bit Windows versions, is there a way I can tell if an executable requires 64-bit to launch?

I'm looking for a better way than Process Explorer to find out, preferrably BEFORE launching.

EDIT: So how would I know that an application requires Win64 environment?

Brett Veenstra
  • 1,497
  • 5
  • 18
  • 27

4 Answers4

3

The processor architecture flag in the header of an EXE or DLL will tell you. The PEDUMP utility (http://www.wheaty.net/downloads.htm) will dump that entry. In the "File Header" section, look at "Machine". The i386 (32-bit Intel) flag is 0x014c. The 64-bit x86 flag is 0x8664.

See also: https://stackoverflow.com/questions/197951/how-can-i-determine-for-which-platform-an-executable-is-compiled/198009

Evan Anderson
  • 141,881
  • 20
  • 196
  • 331
  • Nice tip. Too bad there isn't a Windows Explorer extension for this (although this looks close: http://www.codeproject.com/KB/applications/asmshell.aspx). – Brett Veenstra Jun 22 '09 at 20:41
1

Another simple way is to use PESnoop:

C:\>pesnoop photoshop.exe /pe_dh


-------------------------------------------------------------------------------
 PESnoop 2.0 - Advanced PE32/PE32+/COFF OBJ,LIB command line dumper by yoda
-------------------------------------------------------------------------------

Dump of file: photoshop.exe...
Modus:        64bit Portable Executable Image...
...

One place to get PESnoop is here: http://www.prestosoft.com/download/plugins/PESnoop.zip

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
ViperGeek
  • 121
  • 3
1

And for you GUI enthusiasts, the absolute easiest way is to install this Explorer extension:

http://www.silurian.com/win32/inspect.htm

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
ViperGeek
  • 121
  • 3
0

Some vendors will also put meta information in the file that will indicate that it's a 64-bit binary. Get the properties on a .exe and look at the version tab. For example, SQL Server 2005 says "SQL Server Windows NT - 64 Bit" in the description. It also has other information indicating 64-bit in fields under "Other version information". This would be up to the vendor, however.

squillman
  • 37,883
  • 12
  • 92
  • 146