Author Topic: Detecting if an EXE file is x86 or x64  (Read 2870 times)

DavidGDFC

  • Newbie
  • *
  • Posts: 8
Detecting if an EXE file is x86 or x64
« on: May 24, 2017, 03:25:30 PM »
Hello,

I've been using EXIFtool for a long time and today I decided to register in the forum to ask a question.

I often use EXIFtool to determine whether a programme is x86 or x64. Today I was doing some testing and I got a strange result when reading
Greenshot.exe (see programme on http://getgreenshot.org/downloads/).

According to the About section of programme, it's x64, and it's, in fact, installed in <Program Files> instead of <Program Files(x86)>. However, EXIFtool 10.53 says it's x86.

Thank you in advance for your help and congratulations on this great piece of software!

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 13651
    • ExifTool Home Page
Re: Detecting if an EXE file is x86 or x64
« Reply #1 on: May 25, 2017, 07:33:25 AM »
The MachineType in the PE COFF header indicates an Intel 386 or later, so ExifTool reports this as 32-bit.  According to this post, this should work.  Perhaps try some of the other methods shown here to see what they say.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DavidGDFC

  • Newbie
  • *
  • Posts: 8
Re: Detecting if an EXE file is x86 or x64
« Reply #2 on: June 08, 2017, 02:29:53 PM »
Hi, Phil,

Thank you very much for your quick answer and excuse me for my late response. I appreciate the information you've provided.

The advantage of using EXIFTool is that you don't need to run the application to know whether it's x86 or x64. If I understood well, the developer didn't write the correct information on the EXE file and that's why EXIFTool displays x86 instead of x64. I guess I could write to the developer to make them know.

David

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2031
Re: Detecting if an EXE file is x86 or x64
« Reply #3 on: June 08, 2017, 03:02:39 PM »
Perhaps try some of the other methods shown here to see what they say.

I downloaded the program mentioned and tested it with the methods mentioned in that link.  Windows classifies the program as 64 bit.   Exiftool 10.55 returns it as Win32 EXE.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

DavidGDFC

  • Newbie
  • *
  • Posts: 8
Re: Detecting if an EXE file is x86 or x64
« Reply #4 on: June 13, 2017, 01:47:14 PM »
Hello,

Thank you for your testing. I only wanted to say that Win32 (file type) corresponds to both x86 and x64 (machine type). EXIFTool shows "Win32 EXE" for file type and "Intel 386 or later, and compatibles" (x86) for machine type. I've double-checked and I'm using the 64-bit version of the programme.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 13651
    • ExifTool Home Page
Re: Detecting if an EXE file is x86 or x64
« Reply #5 on: June 14, 2017, 07:33:05 AM »
I still want to look at this in more detail to see what is going on.  It would be useful if you could send me Greenshot.exe for testing (your download link gives me an installer and I don't want to run the installer).  Zipped would be best.  My email is phil at owl.phy.queensu.ca

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DavidGDFC

  • Newbie
  • *
  • Posts: 8
Re: Detecting if an EXE file is x86 or x64
« Reply #6 on: June 14, 2017, 02:17:48 PM »
Hello, Phil,

Thank you: I've just sent you the file.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 13651
    • ExifTool Home Page
Re: Detecting if an EXE file is x86 or x64
« Reply #7 on: June 15, 2017, 07:22:28 AM »
I got the file, thanks.  I'll see what I can do to identify it properly, but this will take some work.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DavidGDFC

  • Newbie
  • *
  • Posts: 8
Re: Detecting if an EXE file is x86 or x64
« Reply #8 on: August 12, 2017, 07:08:47 AM »
Hi, Phil,

I was wondering if there's been any progress on this issue.

Thanks for your time!

Regards!

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 13651
    • ExifTool Home Page
Re: Detecting if an EXE file is x86 or x64
« Reply #9 on: August 12, 2017, 08:53:51 AM »
No progress yet, sorry.  I did a bit of research so far but didn't find anything useful.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DavidGDFC

  • Newbie
  • *
  • Posts: 8
Re: Detecting if an EXE file is x86 or x64
« Reply #10 on: August 22, 2017, 06:54:15 PM »
Thanks anyway, Phil. :-)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 13651
    • ExifTool Home Page
Re: Detecting if an EXE file is x86 or x64
« Reply #11 on: August 24, 2017, 03:22:11 PM »
This is still on my list to look into in more detail, but the time scale at this point is months since I am about to go on a 3 week vacation starting monday.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DavidGDFC

  • Newbie
  • *
  • Posts: 8
Re: Detecting if an EXE file is x86 or x64
« Reply #12 on: March 05, 2018, 06:35:45 PM »
Hello, Phil,

I hope you don't mind me asking if there are any updates about the issue. I suppose it's not a big deal for people using EXIF, but it would be nice to know that the detection of the x86 or x64 architecture is accurate.

Thank you for your time.

Regards,

David

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 13651
    • ExifTool Home Page
Re: Detecting if an EXE file is x86 or x64
« Reply #13 on: March 06, 2018, 07:26:13 AM »
Hi David,

Thanks for reminding me.  I'll bump this up on my to-do list.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DavidGDFC

  • Newbie
  • *
  • Posts: 8
Re: Detecting if an EXE file is x86 or x64
« Reply #14 on: March 06, 2018, 09:51:48 AM »
Thank you, Phil!