kongo86 / pefile

Automatically exported from code.google.com/p/pefile
Other
0 stars 0 forks source link

FileVersion and ProductVersion returning the same values #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download an EXE where the file version is different from the product 
version. (I'm using CurrPorts, as provided by NirSoft.)
2. Run the script to retrieve FileVersion and ProductVersion information.

What is the expected output?

FileVersion: 2.1.0.0
ProductVersion: 2.10

What do you see instead?

FileVersion: 2.10
ProductVersion: 2.10

What version of the product are you using? On what operating system?

Python: 2.7.5
Version: 1.2.10-139
OS: Windows 7 64-bit

Please provide any additional information below.

The code:

import pefile

pe = pefile.PE(r"C:\Path\To\File\cports.exe")
print pe.FileInfo[0].StringTable[0].entries['FileVersion']
print pe.FileInfo[0].StringTable[0].entries['ProductVersion']

Original issue reported on code.google.com by christin...@booker.com on 5 Nov 2014 at 11:16

Attachments:

GoogleCodeExporter commented 9 years ago
Meanwhile, I follow the code here, and I get both file and product returning 
the file info and NOT the product info:

http://stackoverflow.com/questions/1264472/using-the-pefile-py-to-get-file-exe-v
ersion

So I suppose between the two, I'll get the correct info?

Original comment by christin...@booker.com on 5 Nov 2014 at 11:23